File style cleanup for the SDL 2.0 release
This commit is contained in:
parent
2ac8624930
commit
0cb6385637
376 changed files with 17562 additions and 17773 deletions
|
@ -33,14 +33,14 @@
|
|||
|
||||
#include "SDL_log.h"
|
||||
|
||||
#define DFB_VERSIONNUM(X, Y, Z) \
|
||||
((X)*1000 + (Y)*100 + (Z))
|
||||
#define DFB_VERSIONNUM(X, Y, Z) \
|
||||
((X)*1000 + (Y)*100 + (Z))
|
||||
|
||||
#define DFB_COMPILEDVERSION \
|
||||
DFB_VERSIONNUM(DIRECTFB_MAJOR_VERSION, DIRECTFB_MINOR_VERSION, DIRECTFB_MICRO_VERSION)
|
||||
DFB_VERSIONNUM(DIRECTFB_MAJOR_VERSION, DIRECTFB_MINOR_VERSION, DIRECTFB_MICRO_VERSION)
|
||||
|
||||
#define DFB_VERSION_ATLEAST(X, Y, Z) \
|
||||
(DFB_COMPILEDVERSION >= DFB_VERSIONNUM(X, Y, Z))
|
||||
(DFB_COMPILEDVERSION >= DFB_VERSIONNUM(X, Y, Z))
|
||||
|
||||
#if (DFB_VERSION_ATLEAST(1,0,0))
|
||||
#ifdef SDL_VIDEO_OPENGL
|
||||
|
@ -51,10 +51,10 @@
|
|||
#endif
|
||||
|
||||
/* Set below to 1 to compile with (old) multi mice/keyboard api. Code left in
|
||||
* in case we see this again ...
|
||||
* in case we see this again ...
|
||||
*/
|
||||
|
||||
#define USE_MULTI_API (0)
|
||||
#define USE_MULTI_API (0)
|
||||
|
||||
/* Support for LUT8/INDEX8 pixel format.
|
||||
* This is broken in DirectFB 1.4.3. It works in 1.4.0 and 1.4.5
|
||||
|
@ -62,18 +62,18 @@
|
|||
*/
|
||||
|
||||
#if (DFB_COMPILEDVERSION == DFB_VERSIONNUM(1, 4, 3))
|
||||
#define ENABLE_LUT8 (0)
|
||||
#define ENABLE_LUT8 (0)
|
||||
#else
|
||||
#define ENABLE_LUT8 (1)
|
||||
#define ENABLE_LUT8 (1)
|
||||
#endif
|
||||
|
||||
#define DIRECTFB_DEBUG 1
|
||||
|
||||
#define DFBENV_USE_YUV_UNDERLAY "SDL_DIRECTFB_YUV_UNDERLAY" /* Default: off */
|
||||
#define DFBENV_USE_YUV_DIRECT "SDL_DIRECTFB_YUV_DIRECT" /* Default: off */
|
||||
#define DFBENV_USE_X11_CHECK "SDL_DIRECTFB_X11_CHECK" /* Default: on */
|
||||
#define DFBENV_USE_LINUX_INPUT "SDL_DIRECTFB_LINUX_INPUT" /* Default: on */
|
||||
#define DFBENV_USE_WM "SDL_DIRECTFB_WM" /* Default: off */
|
||||
#define DFBENV_USE_YUV_UNDERLAY "SDL_DIRECTFB_YUV_UNDERLAY" /* Default: off */
|
||||
#define DFBENV_USE_YUV_DIRECT "SDL_DIRECTFB_YUV_DIRECT" /* Default: off */
|
||||
#define DFBENV_USE_X11_CHECK "SDL_DIRECTFB_X11_CHECK" /* Default: on */
|
||||
#define DFBENV_USE_LINUX_INPUT "SDL_DIRECTFB_LINUX_INPUT" /* Default: on */
|
||||
#define DFBENV_USE_WM "SDL_DIRECTFB_WM" /* Default: off */
|
||||
|
||||
#define SDL_DFB_RELEASE(x) do { if ( (x) != NULL ) { SDL_DFB_CHECK(x->Release(x)); x = NULL; } } while (0)
|
||||
#define SDL_DFB_FREE(x) do { if ( (x) != NULL ) { SDL_free(x); x = NULL; } } while (0)
|
||||
|
@ -89,11 +89,11 @@
|
|||
#define SDL_DFB_DEBUG(x...) SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, x)
|
||||
|
||||
static inline DFBResult sdl_dfb_check(DFBResult ret, const char *src_file, int src_line) {
|
||||
if (ret != DFB_OK) {
|
||||
SDL_DFB_LOG("%s (%d):%s", src_file, src_line, DirectFBErrorString (ret) );
|
||||
SDL_SetError("%s:%s", SDL_DFB_CONTEXT, DirectFBErrorString (ret) );
|
||||
}
|
||||
return ret;
|
||||
if (ret != DFB_OK) {
|
||||
SDL_DFB_LOG("%s (%d):%s", src_file, src_line, DirectFBErrorString (ret) );
|
||||
SDL_SetError("%s:%s", SDL_DFB_CONTEXT, DirectFBErrorString (ret) );
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define SDL_DFB_CHECK(x...) do { sdl_dfb_check( x, __FILE__, __LINE__); } while (0)
|
||||
|
@ -113,9 +113,9 @@ static inline DFBResult sdl_dfb_check(DFBResult ret, const char *src_file, int s
|
|||
do { \
|
||||
r = SDL_calloc (n, s); \
|
||||
if (!(r)) { \
|
||||
SDL_DFB_ERR("Out of memory"); \
|
||||
SDL_DFB_ERR("Out of memory"); \
|
||||
SDL_OutOfMemory(); \
|
||||
goto error; \
|
||||
goto error; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
@ -130,10 +130,10 @@ static inline DFBResult sdl_dfb_check(DFBResult ret, const char *src_file, int s
|
|||
typedef struct _DFB_KeyboardData DFB_KeyboardData;
|
||||
struct _DFB_KeyboardData
|
||||
{
|
||||
const SDL_Scancode *map; /* keyboard scancode map */
|
||||
int map_size; /* size of map */
|
||||
int map_adjust; /* index adjust */
|
||||
int is_generic; /* generic keyboard */
|
||||
const SDL_Scancode *map; /* keyboard scancode map */
|
||||
int map_size; /* size of map */
|
||||
int map_adjust; /* index adjust */
|
||||
int is_generic; /* generic keyboard */
|
||||
int id;
|
||||
};
|
||||
|
||||
|
@ -142,21 +142,21 @@ struct _DFB_DeviceData
|
|||
{
|
||||
int initialized;
|
||||
|
||||
IDirectFB *dfb;
|
||||
int num_mice;
|
||||
int mouse_id[0x100];
|
||||
int num_keyboard;
|
||||
DFB_KeyboardData keyboard[10];
|
||||
SDL_Window *firstwin;
|
||||
IDirectFB *dfb;
|
||||
int num_mice;
|
||||
int mouse_id[0x100];
|
||||
int num_keyboard;
|
||||
DFB_KeyboardData keyboard[10];
|
||||
SDL_Window *firstwin;
|
||||
|
||||
int use_yuv_underlays;
|
||||
int use_yuv_direct;
|
||||
int use_linux_input;
|
||||
int has_own_wm;
|
||||
int use_yuv_underlays;
|
||||
int use_yuv_direct;
|
||||
int use_linux_input;
|
||||
int has_own_wm;
|
||||
|
||||
|
||||
/* window grab */
|
||||
SDL_Window *grabbed_window;
|
||||
/* window grab */
|
||||
SDL_Window *grabbed_window;
|
||||
|
||||
/* global events */
|
||||
IDirectFBEventBuffer *events;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue