Page 1 of 1

[GLES branch bug] Not telling OS that key event was handled

Posted: Sat May 14, 2016 1:58 pm
by est31
Hi,

minetest is atm on svn revision 5122. From what I see, there is a bug in source/Irrlicht/Android/CIrrDeviceAndroid.cpp, function CIrrDeviceAndroid::handleInput:

In line 491 of the file there is "device->postEventFromUser(event)". Then status is returned.

According to the docs in android_native_app_glue.h (from the android NDK), the onInputEvent function (which gets set to CIrrDeviceAndroid::handleInput) "Return 1 if you have handled the event, 0 for any default dispatching".

Code as of svn revision 5122 does not do this. Especially, we should ask lower level code for whether the event is handled or not. I believe that works by doing "status = device->postEventFromUser(event);" instead. Then we can tell the OS that we have handled specific keys, and others not.

I only believe that the code should be that way, I haven't tested it yet whether my proposed fix works for me.

Re: [GLES branch bug] Not telling OS that key event was hand

Posted: Mon May 16, 2016 1:49 am
by est31
Okay I've tested my fix now and it does what it should, so the bug is really there, and I've already described the way to fix it.