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

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
est31
Posts: 14
Joined: Wed Sep 02, 2015 7:17 am

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

Post 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.
est31
Posts: 14
Joined: Wed Sep 02, 2015 7:17 am

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

Post 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.
Post Reply