ref: fa3dc6f58921ec8299b1ec49913b75fda1659e74
parent: 981d972f3da3418e58da11515db6979d3f85a08a
author: Simon Howard <fraggle@soulsphere.org>
date: Fri Apr 10 19:44:13 EDT 2015
Strip out SDL_VERSION_ATLEAST #ifdef conditionals. These were added ages ago as hacks to make the code compile with SDL2, back when SDL2 was still in development. They aren't relevant any more and aren't useful - the actual SDL2 port is proceeding on sdl2-branch.
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -479,9 +479,7 @@
case SDLK_PAUSE: return KEY_PAUSE;
-#if !SDL_VERSION_ATLEAST(1, 3, 0)
case SDLK_EQUALS: return KEY_EQUALS;
-#endif
case SDLK_MINUS: return KEY_MINUS;
@@ -495,10 +493,8 @@
case SDLK_LALT:
case SDLK_RALT:
-#if !SDL_VERSION_ATLEAST(1, 3, 0)
case SDLK_LMETA:
case SDLK_RMETA:
-#endif
return KEY_RALT;
case SDLK_CAPSLOCK: return KEY_CAPSLOCK;
@@ -829,11 +825,7 @@
// Clear any relative movement caused by warping
SDL_PumpEvents();
-#if SDL_VERSION_ATLEAST(1, 3, 0)
- SDL_GetRelativeMouseState(0, NULL, NULL);
-#else
SDL_GetRelativeMouseState(NULL, NULL);
-#endif
}
//
@@ -847,11 +839,7 @@
int x, y;
event_t ev;
-#if SDL_VERSION_ATLEAST(1, 3, 0)
- SDL_GetRelativeMouseState(0, &x, &y);
-#else
SDL_GetRelativeMouseState(&x, &y);
-#endif
if (x != 0 || y != 0)
{
@@ -2023,9 +2011,7 @@
// has to be done before the call to SDL_SetVideoMode.
I_InitWindowTitle();
-#if !SDL_VERSION_ATLEAST(1, 3, 0)
I_InitWindowIcon();
-#endif
// Warning to OS X users... though they might never see it :(
#ifdef __MACOSX__
--- a/textscreen/txt_sdl.c
+++ b/textscreen/txt_sdl.c
@@ -412,11 +412,7 @@
void TXT_GetMousePosition(int *x, int *y)
{
-#if SDL_VERSION_ATLEAST(1, 3, 0)
- SDL_GetMouseState(0, x, y);
-#else
SDL_GetMouseState(x, y);
-#endif
*x /= font->w;
*y /= font->h;
@@ -466,10 +462,8 @@
case SDLK_LALT:
case SDLK_RALT:
-#if !SDL_VERSION_ATLEAST(1, 3, 0)
case SDLK_LMETA:
case SDLK_RMETA:
-#endif
return KEY_RALT;
case SDLK_CAPSLOCK: return KEY_CAPSLOCK;
@@ -604,10 +598,8 @@
case SDLK_LALT:
case SDLK_RALT:
-#if !SDL_VERSION_ATLEAST(1, 3, 0)
case SDLK_LMETA:
case SDLK_RMETA:
-#endif
mod = TXT_MOD_ALT;
break;