Fixes a build error with SDL2, refs #2041

This was SVN commit r13572.
This commit is contained in:
historic_bruno 2013-07-17 06:33:11 +00:00
parent 39c0498811
commit 38cdc38bba

View File

@ -281,7 +281,12 @@ InReaction CDropDown::ManuallyHandleEvent(const SDL_Event_* ev)
// If we have imputed a character try to get the closest element to it.
// TODO: not too nice and doesn't deal with dashes.
if (m_Open && ((szChar >= SDLK_a && szChar <= SDLK_z) || szChar == SDLK_SPACE
|| (szChar >= SDLK_0 && szChar <= SDLK_9) || (szChar >= SDLK_KP0 && szChar <= SDLK_KP9)))
|| (szChar >= SDLK_0 && szChar <= SDLK_9)
#if !SDL_VERSION_ATLEAST(2,0,0)
|| (szChar >= SDLK_KP0 && szChar <= SDLK_KP9)))
#else // SDL2
|| (szChar >= SDLK_KP_0 && szChar <= SDLK_KP_9)))
#endif
{
// arbitrary 1 second limit to add to string or start fresh.
// maximal amount of characters is 100, which imo is far more than enough.