1
1
forked from 0ad/0ad

Fix Windows build

This was SVN commit r10896.
This commit is contained in:
Ykkrosh 2012-01-11 23:04:33 +00:00
parent d07eac218c
commit 6bb54ee1d4
2 changed files with 3 additions and 11 deletions

View File

@ -337,7 +337,7 @@ LIB_API void SDL_WM_SetCaption(const char *title, const char *icon);
LIB_API Uint8 SDL_GetAppState();
// Pretend that we always implement the latest version of SDL
#define SDL_VERSION_ATLEAST(X, Y, Z) 1
// Pretend that we always implement the latest version of SDL 1.2 (but not 1.3)
#define SDL_VERSION_ATLEAST(X, Y, Z) ((X) == 1 && (Y) <= 2)
#endif // #ifndef INCLUDED_WSDL

View File

@ -69,15 +69,7 @@ InReaction GlobalsInputHandler(const SDL_Event_* ev)
case SDL_KEYDOWN:
case SDL_KEYUP:
c = ev->ev.key.keysym.sym;
if(c < ARRAY_SIZE(g_keys))
g_keys[c] = (ev->ev.type == SDL_KEYDOWN);
else
{
// don't complain: this happens when the hotkey system
// spoofs keys (it assigns values starting from SDLK_LAST)
//debug_warn(L"invalid key");
}
g_keys[ev->ev.key.keysym.sym] = (ev->ev.type == SDL_KEYDOWN);
return IN_PASS;
default: