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:
@ -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 )
|
||||
|
Reference in New Issue
Block a user