Change GetCmdForHotkey to use a switch. Cuts down on if-statement spam.
Also fixed a typo in ConfigMain.
This commit is contained in:
parent
178b1b3862
commit
12162a269b
|
@ -494,7 +494,7 @@ void CConfigMain::InitializeGUITooltips()
|
||||||
|
|
||||||
// Display - Interface
|
// Display - Interface
|
||||||
ConfirmStop->SetToolTip(_("Show a confirmation box before stopping a game."));
|
ConfirmStop->SetToolTip(_("Show a confirmation box before stopping a game."));
|
||||||
UsePanicHandlers->SetToolTip(_("Show a message box when a potentially serious error has occured.\nDisabling this may avoid annoying and non-fatal messages, but it may also mean that Dolphin suddenly crashes without any explanation at all."));
|
UsePanicHandlers->SetToolTip(_("Show a message box when a potentially serious error has occurred.\nDisabling this may avoid annoying and non-fatal messages, but it may also mean that Dolphin suddenly crashes without any explanation at all."));
|
||||||
OnScreenDisplayMessages->SetToolTip(_("Show messages on the emulation screen area.\nThese messages include memory card writes, video backend and CPU information, and JIT cache clearing."));
|
OnScreenDisplayMessages->SetToolTip(_("Show messages on the emulation screen area.\nThese messages include memory card writes, video backend and CPU information, and JIT cache clearing."));
|
||||||
|
|
||||||
InterfaceLang->SetToolTip(_("Change the language of the user interface.\nRequires restart."));
|
InterfaceLang->SetToolTip(_("Change the language of the user interface.\nRequires restart."));
|
||||||
|
|
|
@ -313,7 +313,7 @@ CFrame::CFrame(wxFrame* parent,
|
||||||
ConsoleListener *Console = LogManager::GetInstance()->GetConsoleListener();
|
ConsoleListener *Console = LogManager::GetInstance()->GetConsoleListener();
|
||||||
if (SConfig::GetInstance().m_InterfaceConsole) Console->Open();
|
if (SConfig::GetInstance().m_InterfaceConsole) Console->Open();
|
||||||
|
|
||||||
// Start debugging mazimized
|
// Start debugging maximized
|
||||||
if (UseDebugger) this->Maximize(true);
|
if (UseDebugger) this->Maximize(true);
|
||||||
// Debugger class
|
// Debugger class
|
||||||
if (UseDebugger)
|
if (UseDebugger)
|
||||||
|
@ -740,78 +740,107 @@ bool IsHotkey(wxKeyEvent &event, int Id)
|
||||||
|
|
||||||
int GetCmdForHotkey(unsigned int key)
|
int GetCmdForHotkey(unsigned int key)
|
||||||
{
|
{
|
||||||
if (key == HK_OPEN)
|
switch (key)
|
||||||
|
{
|
||||||
|
case HK_OPEN:
|
||||||
return wxID_OPEN;
|
return wxID_OPEN;
|
||||||
if (key == HK_CHANGE_DISC)
|
|
||||||
|
case HK_CHANGE_DISC:
|
||||||
return IDM_CHANGEDISC;
|
return IDM_CHANGEDISC;
|
||||||
if (key == HK_REFRESH_LIST)
|
|
||||||
|
case HK_REFRESH_LIST:
|
||||||
return wxID_REFRESH;
|
return wxID_REFRESH;
|
||||||
|
|
||||||
if (key == HK_PLAY_PAUSE)
|
case HK_PLAY_PAUSE:
|
||||||
return IDM_PLAY;
|
return IDM_PLAY;
|
||||||
if (key == HK_STOP)
|
|
||||||
|
case HK_STOP:
|
||||||
return IDM_STOP;
|
return IDM_STOP;
|
||||||
if (key == HK_RESET)
|
|
||||||
|
case HK_RESET:
|
||||||
return IDM_RESET;
|
return IDM_RESET;
|
||||||
if (key == HK_FRAME_ADVANCE)
|
|
||||||
|
case HK_FRAME_ADVANCE:
|
||||||
return IDM_FRAMESTEP;
|
return IDM_FRAMESTEP;
|
||||||
|
|
||||||
if (key == HK_START_RECORDING)
|
case HK_START_RECORDING:
|
||||||
return IDM_RECORD;
|
return IDM_RECORD;
|
||||||
if (key == HK_PLAY_RECORDING)
|
|
||||||
|
case HK_PLAY_RECORDING:
|
||||||
return IDM_PLAYRECORD;
|
return IDM_PLAYRECORD;
|
||||||
if (key == HK_EXPORT_RECORDING)
|
|
||||||
|
case HK_EXPORT_RECORDING:
|
||||||
return IDM_RECORDEXPORT;
|
return IDM_RECORDEXPORT;
|
||||||
if (key == HK_READ_ONLY_MODE)
|
|
||||||
|
case HK_READ_ONLY_MODE:
|
||||||
return IDM_RECORDREADONLY;
|
return IDM_RECORDREADONLY;
|
||||||
|
|
||||||
if (key == HK_FULLSCREEN)
|
case HK_FULLSCREEN:
|
||||||
return IDM_TOGGLE_FULLSCREEN;
|
return IDM_TOGGLE_FULLSCREEN;
|
||||||
if (key == HK_SCREENSHOT)
|
|
||||||
|
case HK_SCREENSHOT:
|
||||||
return IDM_SCREENSHOT;
|
return IDM_SCREENSHOT;
|
||||||
|
|
||||||
if (key == HK_WIIMOTE1_CONNECT)
|
case HK_WIIMOTE1_CONNECT:
|
||||||
return IDM_CONNECT_WIIMOTE1;
|
return IDM_CONNECT_WIIMOTE1;
|
||||||
if (key == HK_WIIMOTE2_CONNECT)
|
|
||||||
|
case HK_WIIMOTE2_CONNECT:
|
||||||
return IDM_CONNECT_WIIMOTE2;
|
return IDM_CONNECT_WIIMOTE2;
|
||||||
if (key == HK_WIIMOTE3_CONNECT)
|
|
||||||
|
case HK_WIIMOTE3_CONNECT:
|
||||||
return IDM_CONNECT_WIIMOTE3;
|
return IDM_CONNECT_WIIMOTE3;
|
||||||
if (key == HK_WIIMOTE4_CONNECT)
|
|
||||||
|
case HK_WIIMOTE4_CONNECT:
|
||||||
return IDM_CONNECT_WIIMOTE4;
|
return IDM_CONNECT_WIIMOTE4;
|
||||||
|
|
||||||
if (key == HK_LOAD_STATE_SLOT_1)
|
case HK_LOAD_STATE_SLOT_1:
|
||||||
return IDM_LOADSLOT1;
|
return IDM_LOADSLOT1;
|
||||||
if (key == HK_LOAD_STATE_SLOT_2)
|
|
||||||
|
case HK_LOAD_STATE_SLOT_2:
|
||||||
return IDM_LOADSLOT2;
|
return IDM_LOADSLOT2;
|
||||||
if (key == HK_LOAD_STATE_SLOT_3)
|
|
||||||
|
case HK_LOAD_STATE_SLOT_3:
|
||||||
return IDM_LOADSLOT3;
|
return IDM_LOADSLOT3;
|
||||||
if (key == HK_LOAD_STATE_SLOT_4)
|
|
||||||
|
case HK_LOAD_STATE_SLOT_4:
|
||||||
return IDM_LOADSLOT4;
|
return IDM_LOADSLOT4;
|
||||||
if (key == HK_LOAD_STATE_SLOT_5)
|
|
||||||
|
case HK_LOAD_STATE_SLOT_5:
|
||||||
return IDM_LOADSLOT5;
|
return IDM_LOADSLOT5;
|
||||||
if (key == HK_LOAD_STATE_SLOT_6)
|
|
||||||
|
case HK_LOAD_STATE_SLOT_6:
|
||||||
return IDM_LOADSLOT6;
|
return IDM_LOADSLOT6;
|
||||||
if (key == HK_LOAD_STATE_SLOT_7)
|
|
||||||
|
case HK_LOAD_STATE_SLOT_7:
|
||||||
return IDM_LOADSLOT7;
|
return IDM_LOADSLOT7;
|
||||||
if (key == HK_LOAD_STATE_SLOT_8)
|
|
||||||
|
case HK_LOAD_STATE_SLOT_8:
|
||||||
return IDM_LOADSLOT8;
|
return IDM_LOADSLOT8;
|
||||||
|
|
||||||
if (key == HK_SAVE_STATE_SLOT_1)
|
case HK_SAVE_STATE_SLOT_1:
|
||||||
return IDM_SAVESLOT1;
|
return IDM_SAVESLOT1;
|
||||||
if (key == HK_SAVE_STATE_SLOT_2)
|
|
||||||
|
case HK_SAVE_STATE_SLOT_2:
|
||||||
return IDM_SAVESLOT2;
|
return IDM_SAVESLOT2;
|
||||||
if (key == HK_SAVE_STATE_SLOT_3)
|
|
||||||
|
case HK_SAVE_STATE_SLOT_3:
|
||||||
return IDM_SAVESLOT3;
|
return IDM_SAVESLOT3;
|
||||||
if (key == HK_SAVE_STATE_SLOT_4)
|
|
||||||
|
case HK_SAVE_STATE_SLOT_4:
|
||||||
return IDM_SAVESLOT4;
|
return IDM_SAVESLOT4;
|
||||||
if (key == HK_SAVE_STATE_SLOT_5)
|
|
||||||
|
case HK_SAVE_STATE_SLOT_5:
|
||||||
return IDM_SAVESLOT5;
|
return IDM_SAVESLOT5;
|
||||||
if (key == HK_SAVE_STATE_SLOT_6)
|
|
||||||
|
case HK_SAVE_STATE_SLOT_6:
|
||||||
return IDM_SAVESLOT6;
|
return IDM_SAVESLOT6;
|
||||||
if (key == HK_SAVE_STATE_SLOT_7)
|
|
||||||
|
case HK_SAVE_STATE_SLOT_7:
|
||||||
return IDM_SAVESLOT7;
|
return IDM_SAVESLOT7;
|
||||||
if (key == HK_SAVE_STATE_SLOT_8)
|
|
||||||
|
case HK_SAVE_STATE_SLOT_8:
|
||||||
return IDM_SAVESLOT8;
|
return IDM_SAVESLOT8;
|
||||||
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue