#704 fixed BACK button on Android

This commit is contained in:
Vadim Grigoruk 2018-08-24 22:24:20 +03:00
parent 228f5d6d9d
commit 60f0d7a11b
2 changed files with 5 additions and 3 deletions

View File

@ -1,7 +1,7 @@
LOCAL_PATH := $(call my-dir) LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_CFLAGS += -O3 -Wall -std=gnu99 -D"log2(x)=(log(x)/log(2))" LOCAL_CFLAGS += -O3 -Wall -std=gnu99 -D"log2(x)=(log(x)/log(2))" -DTIC80_PRO
LOCAL_MODULE := main LOCAL_MODULE := main
SRC_PATH := ../../../../src SRC_PATH := ../../../../src

View File

@ -430,8 +430,10 @@ static void processKeyboard()
for(s32 i = 0; i < SDL_NUM_SCANCODES && c < BufSize; i++) for(s32 i = 0; i < SDL_NUM_SCANCODES && c < BufSize; i++)
{ {
if(keyboard[i]) if(keyboard[i])
{ {
u32 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++) for(s32 k = 0; k < COUNT_OF(KeyboardCodes); k++)
{ {