diff options
author | Simon Howard | 2009-10-26 19:28:12 +0000 |
---|---|---|
committer | Simon Howard | 2009-10-26 19:28:12 +0000 |
commit | 3771126689527293eb4ad658b338d7910bf79012 (patch) | |
tree | efcb7658b6496289e34f0099dd973971ad9b4f0a /textscreen | |
parent | 42454af827d204444874558ccb340fc6e65f9ac1 (diff) | |
download | chocolate-doom-3771126689527293eb4ad658b338d7910bf79012.tar.gz chocolate-doom-3771126689527293eb4ad658b338d7910bf79012.tar.bz2 chocolate-doom-3771126689527293eb4ad658b338d7910bf79012.zip |
Initial hacks for compiling under SDL 1.3.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1726
Diffstat (limited to 'textscreen')
-rw-r--r-- | textscreen/txt_sdl.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/textscreen/txt_sdl.c b/textscreen/txt_sdl.c index 0b11aeab..4f8bc2a8 100644 --- a/textscreen/txt_sdl.c +++ b/textscreen/txt_sdl.c @@ -285,7 +285,11 @@ void TXT_UpdateScreen(void) 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; @@ -324,7 +328,9 @@ static int TranslateKey(SDL_keysym *sym) case SDLK_PAUSE: return KEY_PAUSE; +#if !SDL_VERSION_ATLEAST(1, 3, 0) case SDLK_EQUALS: return KEY_EQUALS; +#endif case SDLK_LSHIFT: case SDLK_RSHIFT: @@ -335,9 +341,11 @@ static int TranslateKey(SDL_keysym *sym) return KEY_RCTRL; case SDLK_LALT: - case SDLK_LMETA: 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; |