SDL: pressing Back will hide built-in keyboard

This commit is contained in:
Sergii Pylypenko
2015-11-05 22:27:01 +02:00
parent ad9bbd68f3
commit b2061d76e8
6 changed files with 29 additions and 14 deletions

View File

@@ -681,7 +681,7 @@ int main(int argc, char* argv[])
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "SDL key event: evt %s state %s key %4d %12s scancode %4d mod %2d unicode %d", evt.type == SDL_KEYUP ? "UP " : "DOWN" , evt.key.state == SDL_PRESSED ? "PRESSED " : "RELEASED", (int)evt.key.keysym.sym, SDL_GetKeyName(evt.key.keysym.sym), (int)evt.key.keysym.scancode, (int)evt.key.keysym.mod, (int)evt.key.keysym.unicode);
if(evt.key.keysym.sym == SDLK_ESCAPE)
return 0;
if( evt.key.state == SDL_PRESSED )
if( evt.key.state == SDL_RELEASED )
{
if(evt.key.keysym.sym == SDLK_0)
SDL_ANDROID_SetScreenKeyboardButtonShown(SDL_ANDROID_SCREENKEYBOARD_BUTTON_2, 1);