mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-29 21:31:05 +00:00
Allow system to handle volume change keys
This commit is contained in:
parent
bb8d51817b
commit
a72d6db296
@ -274,6 +274,9 @@ public class Apple2Activity extends Activity {
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if ((keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) || (keyCode == KeyEvent.KEYCODE_VOLUME_MUTE) || (keyCode == KeyEvent.KEYCODE_VOLUME_UP)) {
|
||||
return false;
|
||||
}
|
||||
nativeOnKeyDown(keyCode, event.getMetaState());
|
||||
return true;
|
||||
}
|
||||
@ -297,7 +300,7 @@ public class Apple2Activity extends Activity {
|
||||
mView.showMainMenu();
|
||||
return true;
|
||||
} else if ((keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) || (keyCode == KeyEvent.KEYCODE_VOLUME_MUTE) || (keyCode == KeyEvent.KEYCODE_VOLUME_UP)) {
|
||||
return super.onKeyUp(keyCode, event);
|
||||
return false;
|
||||
} else {
|
||||
nativeOnKeyUp(keyCode, event.getMetaState());
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user