1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

Fix compilation with SDL1

+ seems to be fully backward compatible (need more testing)
This commit is contained in:
AlexVinS
2014-05-25 14:29:04 +04:00
parent 56c74bc46a
commit 15fe37133c
3 changed files with 12 additions and 11 deletions

View File

@ -1651,6 +1651,9 @@ void CTextInput::keyPressed( const SDL_KeyboardEvent & key )
}
bool redrawNeeded = false;
#ifdef VCMI_SDL1
std::string oldText = text;
#endif // 0
switch(key.keysym.sym)
{
case SDLK_DELETE: // have index > ' ' so it won't be filtered out by default section
@ -1687,8 +1690,6 @@ void CTextInput::keyPressed( const SDL_KeyboardEvent & key )
redraw();
cb(text);
}
//todo: handle text input for SDL2
}
void CTextInput::setText( const std::string &nText, bool callCb )