From 54c9fb97faabc88e62f99615f185ed4f13a3b044 Mon Sep 17 00:00:00 2001 From: Deve Date: Tue, 21 Aug 2018 21:36:39 +0200 Subject: [PATCH] Use higher values as a fallback for unknown keycodes on android --- lib/irrlicht/source/Irrlicht/CIrrDeviceAndroid.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/irrlicht/source/Irrlicht/CIrrDeviceAndroid.cpp b/lib/irrlicht/source/Irrlicht/CIrrDeviceAndroid.cpp index 34b42230a..682016719 100644 --- a/lib/irrlicht/source/Irrlicht/CIrrDeviceAndroid.cpp +++ b/lib/irrlicht/source/Irrlicht/CIrrDeviceAndroid.cpp @@ -717,7 +717,7 @@ s32 CIrrDeviceAndroid::handleKeyboard(AInputEvent* androidEvent) // scan code, because it's better than nothing if (event.KeyInput.Key == 0) { - event.KeyInput.Key = (EKEY_CODE)scanCode; + event.KeyInput.Key = (EKEY_CODE)((int)IRR_KEY_CODES_COUNT + scanCode); } // Handle an event when back button in pressed just like an escape key @@ -868,7 +868,7 @@ s32 CIrrDeviceAndroid::handleGamepad(AInputEvent* androidEvent) if (event.KeyInput.Key == 0) { - event.KeyInput.Key = (EKEY_CODE)scanCode; + event.KeyInput.Key = (EKEY_CODE)((int)IRR_KEY_CODES_COUNT + scanCode); } postEventFromUser(event);