b906ed4e59
Fixes #2122 Fixes #1454 Addendum (est31) According from its docs in android_native_app_glue.h (from the NDK), the onInputEvent should "Return 1 if you have handled the event, 0 for any default dispatching". Before, we always returned 1, meaning we blocked all hardware keys to be given to the OS. This broke the volume keys and has caused #2122 and #1454. Although it bases on lots of guesswork, it can probably safely be said that CGUIEnvironment::postEventFromUser returns true if the event was handled, and false if not. Therefore, set the status variable depending on what postEventFromUser returned.
21 lines
771 B
Diff
21 lines
771 B
Diff
--- irrlicht/source/Irrlicht/Android/CIrrDeviceAndroid.cpp.orig 2015-08-29 15:43:09.000000000 +0300
|
|
+++ irrlicht/source/Irrlicht/Android/CIrrDeviceAndroid.cpp 2016-05-13 21:36:22.880388505 +0300
|
|
@@ -486,7 +486,7 @@
|
|
event.KeyInput.Char = 0;
|
|
}
|
|
|
|
- device->postEventFromUser(event);
|
|
+ status = device->postEventFromUser(event);
|
|
}
|
|
break;
|
|
default:
|
|
@@ -543,7 +543,7 @@
|
|
KeyMap[1] = KEY_LBUTTON; // AKEYCODE_SOFT_LEFT
|
|
KeyMap[2] = KEY_RBUTTON; // AKEYCODE_SOFT_RIGHT
|
|
KeyMap[3] = KEY_HOME; // AKEYCODE_HOME
|
|
- KeyMap[4] = KEY_BACK; // AKEYCODE_BACK
|
|
+ KeyMap[4] = KEY_CANCEL; // AKEYCODE_BACK
|
|
KeyMap[5] = KEY_UNKNOWN; // AKEYCODE_CALL
|
|
KeyMap[6] = KEY_UNKNOWN; // AKEYCODE_ENDCALL
|
|
KeyMap[7] = KEY_KEY_0; // AKEYCODE_0
|