From 1f748f52aabbb4de947b021e9cd67cc05618e68d Mon Sep 17 00:00:00 2001 From: Vadim Grigoruk Date: Fri, 24 Aug 2018 22:24:20 +0300 Subject: [PATCH] #704 fixed BACK button on Android --- src/system.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/system.c b/src/system.c index 961ddc6..c297d8c 100644 --- a/src/system.c +++ b/src/system.c @@ -478,8 +478,10 @@ static void processKeyboard() for(s32 i = 0; i < SDL_NUM_SCANCODES; i++) { if(keyboard[i]) - { - SDL_Keycode keycode = SDL_GetKeyFromScancode(i); + { + SDL_Keycode keycode = i == SDL_SCANCODE_AC_BACK + ? SDLK_ESCAPE + : SDL_GetKeyFromScancode(i); for(s32 k = 0; k < COUNT_OF(KeyboardCodes); k++) {