engine: platform: sdl: we must notify the engine about the unpressed button when text input was activated
This commit is contained in:
parent
f62aa051c8
commit
f7e12586cf
1 changed files with 7 additions and 10 deletions
|
@ -156,12 +156,10 @@ static void SDLash_KeyEvent( SDL_KeyboardEvent key )
|
|||
}
|
||||
#endif
|
||||
|
||||
if( SDL_IsTextInputActive( ))
|
||||
if( SDL_IsTextInputActive( ) && down )
|
||||
{
|
||||
// this is how engine understands ctrl+c, ctrl+v and other hotkeys
|
||||
if( down && cls.key_dest != key_game )
|
||||
{
|
||||
if( FBitSet( SDL_GetModState(), KMOD_CTRL ))
|
||||
if( cls.key_dest != key_game && FBitSet( SDL_GetModState(), KMOD_CTRL ))
|
||||
{
|
||||
if( keynum >= SDL_SCANCODE_A && keynum <= SDL_SCANCODE_Z )
|
||||
{
|
||||
|
@ -171,7 +169,6 @@ static void SDLash_KeyEvent( SDL_KeyboardEvent key )
|
|||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#if SDL_VERSION_ATLEAST( 2, 0, 0 )
|
||||
// ignore printable keys, they are coming through SDL_TEXTINPUT
|
||||
|
|
Loading…
Add table
Reference in a new issue