|
@@ -59,7 +59,7 @@ public class RetroArchEmulatorActivity extends RetroActivityCamera
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
|
|
system = new AppSystem();
|
|
|
- mRomPath=getIntent().getStringExtra("ROM");
|
|
|
+ mRomPath = getIntent().getStringExtra("ROM");
|
|
|
callback = new EnvironmentCallback() {
|
|
|
@Override
|
|
|
public void setInputDescriptors(InputDescriptorBean[] descriptors) {
|
|
@@ -167,7 +167,7 @@ public class RetroArchEmulatorActivity extends RetroActivityCamera
|
|
|
}
|
|
|
ComponentName componentName = new ComponentName("com.xugame.gameconsoleMenu",
|
|
|
"com.xugame.gameconsole.dialog.localgamesetting.LocalGameSettingDialog");
|
|
|
- intent.putExtra("rompath",mRomPath);
|
|
|
+ intent.putExtra("rompath", mRomPath);
|
|
|
intent.setComponent(componentName);
|
|
|
startActivityForResult(intent, 200);
|
|
|
DebugUtil.i(TAG, "showLocalExitDialog");
|
|
@@ -429,6 +429,12 @@ public class RetroArchEmulatorActivity extends RetroActivityCamera
|
|
|
if (requestCode == 200) {
|
|
|
if (resultCode == 201) {//继续游戏
|
|
|
gameDialogClosed();
|
|
|
+ setJoystickBindJoyKeyNative(0, InputCode.JOYPAD_A, 96);
|
|
|
+ setJoystickBindJoyKeyNative(0, InputCode.JOYPAD_B, 97);
|
|
|
+ setJoystickBindJoyKeyNative(0, InputCode.JOYPAD_X, 99);
|
|
|
+ setJoystickBindJoyKeyNative(0, InputCode.JOYPAD_Y, 100);
|
|
|
+ setJoystickBindJoyKeyNative(0, InputCode.JOYPAD_UP, InputCode.JOYPAD_HAT_UP_MASK);
|
|
|
+ setJoystickBindJoyKeyNative(0, InputCode.JOYPAD_DOWN, InputCode.JOYPAD_HAT_DOWN_MASK);
|
|
|
if (data != null) {
|
|
|
//增加完美像素单独开关,避免混淆
|
|
|
boolean isPixelPerfect = data.getBooleanExtra("is_pixelperfect", false);
|
|
@@ -590,7 +596,12 @@ public class RetroArchEmulatorActivity extends RetroActivityCamera
|
|
|
public void onMenuSaveState(int index) {
|
|
|
DebugUtil.i(TAG, "saveState" + index);
|
|
|
if (index >= 0 && index < 10) {
|
|
|
- saveState(index);
|
|
|
+ if (saveState(index)) {
|
|
|
+ Intent intent = new Intent();
|
|
|
+ intent.setAction(EmulatorMonitor.EMULATOR_SAVE_STATE_ACTION);
|
|
|
+ intent.putExtra("save_state_flag", true);
|
|
|
+ this.sendBroadcast(intent);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -598,7 +609,12 @@ public class RetroArchEmulatorActivity extends RetroActivityCamera
|
|
|
public void onMenuLoadState(int index) {
|
|
|
DebugUtil.i(TAG, "loadState" + index);
|
|
|
if (index >= 0 && index < 10) {
|
|
|
- loadState(index);
|
|
|
+ if (loadState(index)) {
|
|
|
+ Intent intent = new Intent();
|
|
|
+ intent.setAction(EmulatorMonitor.EMULATOR_LOAD_STATE_ACTION);
|
|
|
+ intent.putExtra("load_state_flag", true);
|
|
|
+ this.sendBroadcast(intent);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|