mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-27 09:20:51 +00:00
sdlayer.c: formatting of preprocessor lines
git-svn-id: https://svn.eduke32.com/eduke32@2253 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9617227a87
commit
300fee62da
1 changed files with 21 additions and 21 deletions
|
@ -974,9 +974,9 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
||||||
int32_t regrab = 0;
|
int32_t regrab = 0;
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
static int32_t warnonce = 0;
|
static int32_t warnonce = 0;
|
||||||
#if (SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION < 3)
|
# if (SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION < 3)
|
||||||
static int32_t ovsync = 1;
|
static int32_t ovsync = 1;
|
||||||
#endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
if ((fs == fullscreen) && (x == xres) && (y == yres) && (c == bpp) &&
|
if ((fs == fullscreen) && (x == xres) && (y == yres) && (c == bpp) &&
|
||||||
!videomodereset)
|
!videomodereset)
|
||||||
|
@ -1109,7 +1109,7 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
||||||
#if 0
|
#if 0
|
||||||
{
|
{
|
||||||
char flags[512] = "";
|
char flags[512] = "";
|
||||||
#define FLAG(x,y) if ((sdl_surface->flags & x) == x) { strcat(flags, y); strcat(flags, " "); }
|
# define FLAG(x,y) if ((sdl_surface->flags & x) == x) { strcat(flags, y); strcat(flags, " "); }
|
||||||
FLAG(SDL_HWSURFACE, "HWSURFACE") else
|
FLAG(SDL_HWSURFACE, "HWSURFACE") else
|
||||||
FLAG(SDL_SWSURFACE, "SWSURFACE")
|
FLAG(SDL_SWSURFACE, "SWSURFACE")
|
||||||
FLAG(SDL_ASYNCBLIT, "ASYNCBLIT")
|
FLAG(SDL_ASYNCBLIT, "ASYNCBLIT")
|
||||||
|
@ -1125,7 +1125,7 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
||||||
FLAG(SDL_RLEACCEL, "RLEACCEL")
|
FLAG(SDL_RLEACCEL, "RLEACCEL")
|
||||||
FLAG(SDL_SRCALPHA, "SRCALPHA")
|
FLAG(SDL_SRCALPHA, "SRCALPHA")
|
||||||
FLAG(SDL_PREALLOC, "PREALLOC")
|
FLAG(SDL_PREALLOC, "PREALLOC")
|
||||||
#undef FLAG
|
# undef FLAG
|
||||||
initprintf("SDL Surface flags: %s\n", flags);
|
initprintf("SDL Surface flags: %s\n", flags);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1155,7 +1155,7 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
||||||
glinfo.version = (const char *)bglGetString(GL_VERSION);
|
glinfo.version = (const char *)bglGetString(GL_VERSION);
|
||||||
glinfo.extensions = (const char *)bglGetString(GL_EXTENSIONS);
|
glinfo.extensions = (const char *)bglGetString(GL_EXTENSIONS);
|
||||||
|
|
||||||
#ifdef POLYMER
|
# ifdef POLYMER
|
||||||
if (!Bstrcmp(glinfo.vendor,"ATI Technologies Inc."))
|
if (!Bstrcmp(glinfo.vendor,"ATI Technologies Inc."))
|
||||||
{
|
{
|
||||||
pr_ati_fboworkaround = 1;
|
pr_ati_fboworkaround = 1;
|
||||||
|
@ -1168,7 +1168,7 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pr_ati_nodepthoffset = 0;
|
pr_ati_nodepthoffset = 0;
|
||||||
#ifdef __APPLE__
|
# ifdef __APPLE__
|
||||||
//See bug description at http://lists.apple.com/archives/mac-opengl/2005/Oct/msg00169.html
|
//See bug description at http://lists.apple.com/archives/mac-opengl/2005/Oct/msg00169.html
|
||||||
if (!Bstrncmp(glinfo.renderer,"ATI Radeon 9600", 15))
|
if (!Bstrncmp(glinfo.renderer,"ATI Radeon 9600", 15))
|
||||||
{
|
{
|
||||||
|
@ -1177,11 +1177,11 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pr_ati_textureformat_one = 0;
|
pr_ati_textureformat_one = 0;
|
||||||
#endif
|
# endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pr_ati_fboworkaround = 0;
|
pr_ati_fboworkaround = 0;
|
||||||
#endif
|
# endif // defined POLYMER
|
||||||
|
|
||||||
glinfo.maxanisotropy = 1.0;
|
glinfo.maxanisotropy = 1.0;
|
||||||
glinfo.bgra = 0;
|
glinfo.bgra = 0;
|
||||||
|
@ -1296,7 +1296,7 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
||||||
bpp = oldbpp;
|
bpp = oldbpp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif // defined USE_OPENGL
|
||||||
|
|
||||||
xres = x;
|
xres = x;
|
||||||
yres = y;
|
yres = y;
|
||||||
|
@ -1648,13 +1648,13 @@ int32_t handleevents(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef __linux
|
# ifdef __linux
|
||||||
// The pause key generates a release event right after
|
// The pause key generates a release event right after
|
||||||
// the pressing one on linux. As a result, it gets unseen
|
// the pressing one on linux. As a result, it gets unseen
|
||||||
// by the game most of the time.
|
// by the game most of the time.
|
||||||
if (code == 0x59) // pause
|
if (code == 0x59) // pause
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
SetKey(code, 0);
|
SetKey(code, 0);
|
||||||
if (keypresscallback)
|
if (keypresscallback)
|
||||||
keypresscallback(code, 0);
|
keypresscallback(code, 0);
|
||||||
|
@ -1665,23 +1665,23 @@ int32_t handleevents(void)
|
||||||
{
|
{
|
||||||
case SDL_WINDOWEVENT_FOCUS_GAINED:
|
case SDL_WINDOWEVENT_FOCUS_GAINED:
|
||||||
appactive = 1;
|
appactive = 1;
|
||||||
#ifndef DEBUGGINGAIDS
|
# ifndef DEBUGGINGAIDS
|
||||||
if (mousegrab && moustat)
|
if (mousegrab && moustat)
|
||||||
{
|
{
|
||||||
SDL_WM_GrabInput(SDL_GRAB_ON);
|
SDL_WM_GrabInput(SDL_GRAB_ON);
|
||||||
SDL_ShowCursor(SDL_DISABLE);
|
SDL_ShowCursor(SDL_DISABLE);
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
break;
|
break;
|
||||||
case SDL_WINDOWEVENT_FOCUS_LOST:
|
case SDL_WINDOWEVENT_FOCUS_LOST:
|
||||||
appactive = 0;
|
appactive = 0;
|
||||||
#ifndef DEBUGGINGAIDS
|
# ifndef DEBUGGINGAIDS
|
||||||
if (mousegrab && moustat)
|
if (mousegrab && moustat)
|
||||||
{
|
{
|
||||||
SDL_WM_GrabInput(SDL_GRAB_OFF);
|
SDL_WM_GrabInput(SDL_GRAB_OFF);
|
||||||
SDL_ShowCursor(SDL_ENABLE);
|
SDL_ShowCursor(SDL_ENABLE);
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1710,10 +1710,10 @@ int32_t handleevents(void)
|
||||||
case SDL_KEYDOWN:
|
case SDL_KEYDOWN:
|
||||||
case SDL_KEYUP:
|
case SDL_KEYUP:
|
||||||
code = keytranslation[ev.key.keysym.sym];
|
code = keytranslation[ev.key.keysym.sym];
|
||||||
#ifdef KEY_PRINT_DEBUG
|
# ifdef KEY_PRINT_DEBUG
|
||||||
printf("keytranslation[%d] = %s (%d) %s\n", ev.key.keysym.sym,
|
printf("keytranslation[%d] = %s (%d) %s\n", ev.key.keysym.sym,
|
||||||
key_names[code], code, ev.key.type==SDL_KEYDOWN?"DOWN":"UP");
|
key_names[code], code, ev.key.type==SDL_KEYDOWN?"DOWN":"UP");
|
||||||
#endif
|
# endif
|
||||||
if (code != OSD_OSDKey() && ev.key.keysym.unicode != 0 && ev.key.type == SDL_KEYDOWN &&
|
if (code != OSD_OSDKey() && ev.key.keysym.unicode != 0 && ev.key.type == SDL_KEYDOWN &&
|
||||||
(ev.key.keysym.unicode & 0xff80) == 0 &&
|
(ev.key.keysym.unicode & 0xff80) == 0 &&
|
||||||
((keyasciififoend+1)&(KEYFIFOSIZ-1)) != keyasciififoplc)
|
((keyasciififoend+1)&(KEYFIFOSIZ-1)) != keyasciififoplc)
|
||||||
|
@ -1742,10 +1742,10 @@ int32_t handleevents(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef __linux
|
# ifdef __linux
|
||||||
if (code == 0x59) // pause
|
if (code == 0x59) // pause
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
SetKey(code, 0);
|
SetKey(code, 0);
|
||||||
if (keypresscallback)
|
if (keypresscallback)
|
||||||
keypresscallback(code, 0);
|
keypresscallback(code, 0);
|
||||||
|
@ -1756,7 +1756,7 @@ int32_t handleevents(void)
|
||||||
if (ev.active.state & SDL_APPINPUTFOCUS)
|
if (ev.active.state & SDL_APPINPUTFOCUS)
|
||||||
{
|
{
|
||||||
appactive = ev.active.gain;
|
appactive = ev.active.gain;
|
||||||
#ifndef DEBUGGINGAIDS
|
# ifndef DEBUGGINGAIDS
|
||||||
if (mousegrab && moustat)
|
if (mousegrab && moustat)
|
||||||
{
|
{
|
||||||
if (appactive)
|
if (appactive)
|
||||||
|
@ -1770,7 +1770,7 @@ int32_t handleevents(void)
|
||||||
SDL_ShowCursor(SDL_ENABLE);
|
SDL_ShowCursor(SDL_ENABLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
rv=-1;
|
rv=-1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue