From 4ad6dd09e1087a6a24b10c6befb3c4909f6b4579 Mon Sep 17 00:00:00 2001 From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com> Date: Wed, 4 Dec 2024 17:04:36 +0530 Subject: [PATCH] Android: Fix device volume not working --- .../src/main/java/com/panda3ds/pandroid/app/GameActivity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/GameActivity.java b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/GameActivity.java index 503684acc..c6764d382 100644 --- a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/GameActivity.java +++ b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/GameActivity.java @@ -152,6 +152,10 @@ protected void onPause() { @Override public boolean dispatchKeyEvent(KeyEvent event) { + if (event.getKeyCode() == KeyEvent.KEYCODE_VOLUME_UP || event.getKeyCode() == KeyEvent.KEYCODE_VOLUME_DOWN) { + return super.dispatchKeyEvent(event); + } + if ((!drawerFragment.isOpened()) && InputHandler.processKeyEvent(event)) { return true; }