|
@@ -122,7 +122,8 @@ public class RetroArchEmulatorActivity extends RetroActivityCamera {
|
|
|
// If QUITFOCUS parameter was set then completely exit Retroarch when focus is lost
|
|
|
if (quitfocus) System.exit(0);
|
|
|
}
|
|
|
-
|
|
|
+ boolean isSelect = false;
|
|
|
+ boolean isStart = false;
|
|
|
@Override
|
|
|
public boolean dispatchKeyEvent(KeyEvent event) {
|
|
|
DebugUtil.i(TAG, "" + event.getKeyCode());
|
|
@@ -131,6 +132,26 @@ public class RetroArchEmulatorActivity extends RetroActivityCamera {
|
|
|
showDialog();
|
|
|
return super.dispatchKeyEvent(event);
|
|
|
}
|
|
|
+ if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
|
|
+ if (event.getKeyCode() == KeyEvent.KEYCODE_BUTTON_SELECT) {
|
|
|
+ isSelect = true;
|
|
|
+ }
|
|
|
+ if (event.getKeyCode() == KeyEvent.KEYCODE_BUTTON_START) {
|
|
|
+ isStart = true;
|
|
|
+ }
|
|
|
+ if(isSelect&&isStart){
|
|
|
+ isSelect=false;
|
|
|
+ isStart=false;
|
|
|
+ DebugUtil.i(TAG,"select +start click");
|
|
|
+ }
|
|
|
+ } if (event.getAction() == KeyEvent.ACTION_UP) {
|
|
|
+ if (event.getKeyCode() == KeyEvent.KEYCODE_BUTTON_SELECT) {
|
|
|
+ isSelect = false;
|
|
|
+ } else if (event.getKeyCode() == KeyEvent.KEYCODE_BUTTON_START) {
|
|
|
+ isStart = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return super.dispatchKeyEvent(event);
|
|
|
}
|
|
|
|