Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volume key Android #2122

Closed
MoNTE48 opened this issue Jan 12, 2015 · 6 comments
Closed

Volume key Android #2122

MoNTE48 opened this issue Jan 12, 2015 · 6 comments
Labels
Android Bug Issues that were confirmed to be a bug @ Client / Audiovisuals

Comments

@MoNTE48
Copy link
Contributor

MoNTE48 commented Jan 12, 2015

On Android port Volume key don't work.
Tested on more device.
Don't change volume and don't show volume panel,
Pls, fix.
And Volume (+ -) and power (screenshot on more ROM) = error on chat!

@ShadowNinja ShadowNinja added Android Bug Issues that were confirmed to be a bug @ Client / Audiovisuals labels Jan 12, 2015
@MoNTE48
Copy link
Contributor Author

MoNTE48 commented Aug 15, 2015

This is quite a critical bug. Any options?

@ShadowNinja
Copy link
Member

Related to #1454.

@paramat
Copy link
Contributor

paramat commented Apr 9, 2016

Is this bug in your fork Multicraft? If so is this bug reproducable in Minetest?

@paramat paramat added Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible and removed Bug Issues that were confirmed to be a bug labels Apr 9, 2016
@MoNTE48
Copy link
Contributor Author

MoNTE48 commented Apr 9, 2016

@paramat, This is a bug in Minetest and I could not fix it until now. However, I am working on a temporary fix right now.

@DonBatman
Copy link
Contributor

I can confirm that the volume buttons do nothing in official minetest for Android

@Zeno-
Copy link
Contributor

Zeno- commented Apr 10, 2016

I know this is certainly the case with official minetest Android build because I was trying to work on a fix for it before my break. I'll see if I have any related notes on my laptop regarding it (but I doubt it unfortunately).

Edit: Ok, I'm on my laptop. I can see I was working on this in my repo but about the only changes I'd made were adding some debugging hacks in keycode.cpp obviously trying to work out if at least events were being received. I see nothing in the logcat.txt associated with that build and I obviously did not get far before my break because there is nothing even close to a fix. So it needs looking at. From an obscure comment I left in the code it seems that the android volume keys were triggering "Unexpected multibyte character" (?? But take that with a grain of salt -- or a few hundred grains)

@Zeno- Zeno- added Bug Issues that were confirmed to be a bug and removed Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible labels Apr 10, 2016
@paramat paramat modified the milestone: 0.4.14 May 5, 2016
est31 added a commit to est31/minetest that referenced this issue May 13, 2016
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 minetest#2122 and minetest#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.

This commit bases on a patch provided by @MoNTE48.

Fixes minetest#2122.
Fixes minetest#1454.
@Zeno- Zeno- closed this as completed in b906ed4 May 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Bug Issues that were confirmed to be a bug @ Client / Audiovisuals
Projects
None yet
5 participants