Android: Don't prevent physical volume buttons from working (Thanks 123DMWM)

This commit is contained in:
UnknownShadow200 2020-10-31 17:02:42 +11:00
parent 89214706fb
commit 53e34eec26

View file

@ -205,6 +205,11 @@ public class MainActivity extends Activity implements SurfaceHolder.Callback2 {
}
public boolean onKeyDown(int keyCode, KeyEvent event) {
// Ignore volume keys
if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) return false;
if (keyCode == KeyEvent.KEYCODE_VOLUME_MUTE) return false;
if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) return false;
// TODO: not always handle (use Window_MapKey)
pushCmd(CMD_KEY_DOWN, keyCode);