For Qt GUI added separate hot keys for soft and hard reset functions. Changed soft reset to be default Ctrl+R and hard reset to Ctrl+Shift+R.

This commit is contained in:
harry 2022-08-23 18:36:39 -04:00
parent b97b24a5e9
commit d0add7a609
3 changed files with 13 additions and 7 deletions

View File

@ -1282,16 +1282,16 @@ void consoleWin_t::createMainMenu(void)
connect( Hotkeys[ HK_POWER ].getShortcut(), SIGNAL(activated()), this, SLOT(powerConsoleCB(void)) );
// Emulation -> Reset
resetAct = new QAction(tr("&Reset"), this);
resetAct = new QAction(tr("Hard &Reset"), this);
//resetAct->setShortcut( QKeySequence(tr("Ctrl+R")));
resetAct->setStatusTip(tr("Reset Console"));
resetAct->setStatusTip(tr("Hard Reset of Console"));
resetAct->setIcon( style()->standardIcon( QStyle::SP_DialogResetButton ) );
connect(resetAct, SIGNAL(triggered()), this, SLOT(consoleHardReset(void)) );
emuMenu->addAction(resetAct);
Hotkeys[ HK_RESET ].setAction( resetAct );
connect( Hotkeys[ HK_RESET ].getShortcut(), SIGNAL(activated()), this, SLOT(consoleHardReset(void)) );
Hotkeys[ HK_HARD_RESET ].setAction( resetAct );
connect( Hotkeys[ HK_HARD_RESET ].getShortcut(), SIGNAL(activated()), this, SLOT(consoleHardReset(void)) );
// Emulation -> Soft Reset
sresetAct = new QAction(tr("&Soft Reset"), this);
@ -1302,6 +1302,9 @@ void consoleWin_t::createMainMenu(void)
emuMenu->addAction(sresetAct);
Hotkeys[ HK_SOFT_RESET ].setAction( sresetAct );
connect( Hotkeys[ HK_SOFT_RESET ].getShortcut(), SIGNAL(activated()), this, SLOT(consoleSoftReset(void)) );
// Emulation -> Pause
pauseAct = new QAction(tr("&Pause"), this);
//pauseAct->setShortcut( QKeySequence(tr("Pause")));

View File

@ -187,8 +187,11 @@ int getHotKeyConfig( int i, const char **nameOut, const char **keySeqOut, const
case HK_POWER:
name = "Power"; keySeq = ""; title = "Power"; group = "Emulation";
break;
case HK_RESET:
name = "Reset"; keySeq = "Ctrl+R"; title = "Reset"; group = "Emulation";
case HK_SOFT_RESET:
name = "SoftReset"; keySeq = "Ctrl+R"; title = "Soft Reset"; group = "Emulation";
break;
case HK_HARD_RESET:
name = "HardReset"; keySeq = "Ctrl+Shift+R"; title = "Hard Reset"; group = "Emulation";
break;
case HK_PAUSE:
name = "Pause"; keySeq = "Pause"; title = "Pause"; group = "Emulation";

View File

@ -14,7 +14,7 @@ enum HOTKEY {
HK_OPEN_ROM=0, HK_CLOSE_ROM,
// Emulation power, reset, pause, quit
HK_POWER, HK_RESET, HK_PAUSE, HK_QUIT,
HK_POWER, HK_SOFT_RESET, HK_HARD_RESET, HK_PAUSE, HK_QUIT,
// Emulation Execution Control
HK_FRAME_ADVANCE, HK_DECREASE_SPEED, HK_INCREASE_SPEED, HK_TURBO,