Merge pull request #9223 from Ebola16/D

Android: Suppress warnings in EmulationActivity
This commit is contained in:
JosJuice 2020-11-06 19:57:06 +01:00 committed by GitHub
commit 2acd3abe35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 33 additions and 31 deletions

View File

@ -457,6 +457,7 @@ public final class EmulationActivity extends AppCompatActivity
public void handleCheckableMenuAction(@MenuAction int menuAction, MenuItem item) public void handleCheckableMenuAction(@MenuAction int menuAction, MenuItem item)
{ {
//noinspection SwitchIntDef
switch (menuAction) switch (menuAction)
{ {
case MENU_ACTION_JOYSTICK_REL_CENTER: case MENU_ACTION_JOYSTICK_REL_CENTER:
@ -472,6 +473,7 @@ public final class EmulationActivity extends AppCompatActivity
public void handleMenuAction(@MenuAction int menuAction) public void handleMenuAction(@MenuAction int menuAction)
{ {
//noinspection SwitchIntDef
switch (menuAction) switch (menuAction)
{ {
// Edit the placement of the controls // Edit the placement of the controls
@ -487,137 +489,137 @@ public final class EmulationActivity extends AppCompatActivity
// Enable/Disable specific buttons or the entire input overlay. // Enable/Disable specific buttons or the entire input overlay.
case MENU_ACTION_TOGGLE_CONTROLS: case MENU_ACTION_TOGGLE_CONTROLS:
toggleControls(); toggleControls();
return; break;
// Adjust the scale of the overlay controls. // Adjust the scale of the overlay controls.
case MENU_ACTION_ADJUST_SCALE: case MENU_ACTION_ADJUST_SCALE:
adjustScale(); adjustScale();
return; break;
// (Wii games only) Change the controller for the input overlay. // (Wii games only) Change the controller for the input overlay.
case MENU_ACTION_CHOOSE_CONTROLLER: case MENU_ACTION_CHOOSE_CONTROLLER:
chooseController(); chooseController();
return; break;
case MENU_ACTION_REFRESH_WIIMOTES: case MENU_ACTION_REFRESH_WIIMOTES:
NativeLibrary.RefreshWiimotes(); NativeLibrary.RefreshWiimotes();
return; break;
case MENU_ACTION_PAUSE_EMULATION: case MENU_ACTION_PAUSE_EMULATION:
sUserPausedEmulation = true; sUserPausedEmulation = true;
NativeLibrary.PauseEmulation(); NativeLibrary.PauseEmulation();
return; break;
case MENU_ACTION_UNPAUSE_EMULATION: case MENU_ACTION_UNPAUSE_EMULATION:
sUserPausedEmulation = false; sUserPausedEmulation = false;
NativeLibrary.UnPauseEmulation(); NativeLibrary.UnPauseEmulation();
return; break;
// Screenshot capturing // Screenshot capturing
case MENU_ACTION_TAKE_SCREENSHOT: case MENU_ACTION_TAKE_SCREENSHOT:
NativeLibrary.SaveScreenShot(); NativeLibrary.SaveScreenShot();
return; break;
// Quick save / load // Quick save / load
case MENU_ACTION_QUICK_SAVE: case MENU_ACTION_QUICK_SAVE:
NativeLibrary.SaveState(9, false); NativeLibrary.SaveState(9, false);
return; break;
case MENU_ACTION_QUICK_LOAD: case MENU_ACTION_QUICK_LOAD:
NativeLibrary.LoadState(9); NativeLibrary.LoadState(9);
return; break;
case MENU_ACTION_SAVE_ROOT: case MENU_ACTION_SAVE_ROOT:
showSubMenu(SaveLoadStateFragment.SaveOrLoad.SAVE); showSubMenu(SaveLoadStateFragment.SaveOrLoad.SAVE);
return; break;
case MENU_ACTION_LOAD_ROOT: case MENU_ACTION_LOAD_ROOT:
showSubMenu(SaveLoadStateFragment.SaveOrLoad.LOAD); showSubMenu(SaveLoadStateFragment.SaveOrLoad.LOAD);
return; break;
// Save state slots // Save state slots
case MENU_ACTION_SAVE_SLOT1: case MENU_ACTION_SAVE_SLOT1:
NativeLibrary.SaveState(0, false); NativeLibrary.SaveState(0, false);
return; break;
case MENU_ACTION_SAVE_SLOT2: case MENU_ACTION_SAVE_SLOT2:
NativeLibrary.SaveState(1, false); NativeLibrary.SaveState(1, false);
return; break;
case MENU_ACTION_SAVE_SLOT3: case MENU_ACTION_SAVE_SLOT3:
NativeLibrary.SaveState(2, false); NativeLibrary.SaveState(2, false);
return; break;
case MENU_ACTION_SAVE_SLOT4: case MENU_ACTION_SAVE_SLOT4:
NativeLibrary.SaveState(3, false); NativeLibrary.SaveState(3, false);
return; break;
case MENU_ACTION_SAVE_SLOT5: case MENU_ACTION_SAVE_SLOT5:
NativeLibrary.SaveState(4, false); NativeLibrary.SaveState(4, false);
return; break;
case MENU_ACTION_SAVE_SLOT6: case MENU_ACTION_SAVE_SLOT6:
NativeLibrary.SaveState(5, false); NativeLibrary.SaveState(5, false);
return; break;
// Load state slots // Load state slots
case MENU_ACTION_LOAD_SLOT1: case MENU_ACTION_LOAD_SLOT1:
NativeLibrary.LoadState(0); NativeLibrary.LoadState(0);
return; break;
case MENU_ACTION_LOAD_SLOT2: case MENU_ACTION_LOAD_SLOT2:
NativeLibrary.LoadState(1); NativeLibrary.LoadState(1);
return; break;
case MENU_ACTION_LOAD_SLOT3: case MENU_ACTION_LOAD_SLOT3:
NativeLibrary.LoadState(2); NativeLibrary.LoadState(2);
return; break;
case MENU_ACTION_LOAD_SLOT4: case MENU_ACTION_LOAD_SLOT4:
NativeLibrary.LoadState(3); NativeLibrary.LoadState(3);
return; break;
case MENU_ACTION_LOAD_SLOT5: case MENU_ACTION_LOAD_SLOT5:
NativeLibrary.LoadState(4); NativeLibrary.LoadState(4);
return; break;
case MENU_ACTION_LOAD_SLOT6: case MENU_ACTION_LOAD_SLOT6:
NativeLibrary.LoadState(5); NativeLibrary.LoadState(5);
return; break;
case MENU_ACTION_CHANGE_DISC: case MENU_ACTION_CHANGE_DISC:
FileBrowserHelper.openFilePicker(this, REQUEST_CHANGE_DISC, false, FileBrowserHelper.openFilePicker(this, REQUEST_CHANGE_DISC, false,
FileBrowserHelper.GAME_EXTENSIONS); FileBrowserHelper.GAME_EXTENSIONS);
return; break;
case MENU_SET_IR_SENSITIVITY: case MENU_SET_IR_SENSITIVITY:
setIRSensitivity(); setIRSensitivity();
return; break;
case MENU_ACTION_CHOOSE_DOUBLETAP: case MENU_ACTION_CHOOSE_DOUBLETAP:
chooseDoubleTapButton(); chooseDoubleTapButton();
return; break;
case MENU_ACTION_SCREEN_ORIENTATION: case MENU_ACTION_SCREEN_ORIENTATION:
chooseOrientation(); chooseOrientation();
return; break;
case MENU_ACTION_MOTION_CONTROLS: case MENU_ACTION_MOTION_CONTROLS:
showMotionControlsOptions(); showMotionControlsOptions();
return; break;
case MENU_ACTION_SETTINGS_CORE: case MENU_ACTION_SETTINGS_CORE:
SettingsActivity.launch(this, MenuTag.CONFIG); SettingsActivity.launch(this, MenuTag.CONFIG);
return; break;
case MENU_ACTION_SETTINGS_GRAPHICS: case MENU_ACTION_SETTINGS_GRAPHICS:
SettingsActivity.launch(this, MenuTag.GRAPHICS); SettingsActivity.launch(this, MenuTag.GRAPHICS);
return; break;
case MENU_ACTION_EXIT: case MENU_ACTION_EXIT:
mEmulationFragment.stopEmulation(); mEmulationFragment.stopEmulation();
finish(); finish();
return; break;
} }
} }