mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
[Android] Stop eating button events we don't handle.
We were eating /all/ button events except the back button. This would cause issues where Android wouldn't receive button press events for things like volume rockers. So you couldn't change the audio ingame, even if that button isn't bound to an input. Now we return to Android if we've handled that button press, so it works fine.
This commit is contained in:
@ -69,8 +69,10 @@ public final class NativeLibrary
|
||||
* @param Device The input descriptor of the gamepad.
|
||||
* @param Button Key code identifying which button was pressed.
|
||||
* @param Action Mask identifying which action is happing (button pressed down, or button released).
|
||||
*
|
||||
* @return If we handled the button press.
|
||||
*/
|
||||
public static native void onGamePadEvent(String Device, int Button, int Action);
|
||||
public static native boolean onGamePadEvent(String Device, int Button, int Action);
|
||||
|
||||
/**
|
||||
* Handles gamepad movement events.
|
||||
|
@ -285,8 +285,8 @@ public final class EmulationActivity extends Activity
|
||||
return false;
|
||||
}
|
||||
InputDevice input = event.getDevice();
|
||||
NativeLibrary.onGamePadEvent(InputConfigFragment.getInputDesc(input), event.getKeyCode(), action);
|
||||
return true;
|
||||
boolean handled = NativeLibrary.onGamePadEvent(InputConfigFragment.getInputDesc(input), event.getKeyCode(), action);
|
||||
return handled;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user