For Qt GUI, added hot keys for certain emulation speed presets. Presets are: 1/4x, 1/2x, Normal 1x, 2x, 4x, 8x, and 16x. These hot keys can be mapped to gamepads using advanced key bindings.
This commit is contained in:
parent
8600679636
commit
72b949efcd
|
@ -855,6 +855,14 @@ void consoleWin_t::initHotKeys(void)
|
||||||
Hotkeys[HK_FRAME_ADVANCE].getShortcut()->setEnabled(false);
|
Hotkeys[HK_FRAME_ADVANCE].getShortcut()->setEnabled(false);
|
||||||
Hotkeys[HK_TURBO ].getShortcut()->setEnabled(false);
|
Hotkeys[HK_TURBO ].getShortcut()->setEnabled(false);
|
||||||
|
|
||||||
|
connect( Hotkeys[ HK_SPEED_QUARTER ].getShortcut(), &QShortcut::activated, [] { CustomEmulationSpeed( 25); } );
|
||||||
|
connect( Hotkeys[ HK_SPEED_HALF ].getShortcut(), &QShortcut::activated, [] { CustomEmulationSpeed( 50); } );
|
||||||
|
connect( Hotkeys[ HK_SPEED_NORMAL ].getShortcut(), &QShortcut::activated, [] { CustomEmulationSpeed( 100); } );
|
||||||
|
connect( Hotkeys[ HK_SPEED_2X ].getShortcut(), &QShortcut::activated, [] { CustomEmulationSpeed( 200); } );
|
||||||
|
connect( Hotkeys[ HK_SPEED_4X ].getShortcut(), &QShortcut::activated, [] { CustomEmulationSpeed( 400); } );
|
||||||
|
connect( Hotkeys[ HK_SPEED_8X ].getShortcut(), &QShortcut::activated, [] { CustomEmulationSpeed( 800); } );
|
||||||
|
connect( Hotkeys[ HK_SPEED_16X ].getShortcut(), &QShortcut::activated, [] { CustomEmulationSpeed(1600); } );
|
||||||
|
|
||||||
connect( Hotkeys[ HK_VOLUME_MUTE ].getShortcut(), SIGNAL(activated()), this, SLOT(muteSoundVolume(void)) );
|
connect( Hotkeys[ HK_VOLUME_MUTE ].getShortcut(), SIGNAL(activated()), this, SLOT(muteSoundVolume(void)) );
|
||||||
connect( Hotkeys[ HK_VOLUME_DOWN ].getShortcut(), SIGNAL(activated()), this, SLOT(decrSoundVolume(void)) );
|
connect( Hotkeys[ HK_VOLUME_DOWN ].getShortcut(), SIGNAL(activated()), this, SLOT(decrSoundVolume(void)) );
|
||||||
connect( Hotkeys[ HK_VOLUME_UP ].getShortcut(), SIGNAL(activated()), this, SLOT(incrSoundVolume(void)) );
|
connect( Hotkeys[ HK_VOLUME_UP ].getShortcut(), SIGNAL(activated()), this, SLOT(incrSoundVolume(void)) );
|
||||||
|
|
|
@ -214,6 +214,27 @@ int getHotKeyConfig( int i, const char **nameOut, const char **keySeqOut, const
|
||||||
case HK_TURBO:
|
case HK_TURBO:
|
||||||
name = "Turbo"; keySeq = "Tab"; group = "Speed";
|
name = "Turbo"; keySeq = "Tab"; group = "Speed";
|
||||||
break;
|
break;
|
||||||
|
case HK_SPEED_NORMAL:
|
||||||
|
name = "Normal Speed"; keySeq = ""; group = "Speed";
|
||||||
|
break;
|
||||||
|
case HK_SPEED_QUARTER:
|
||||||
|
name = "1/4x Speed"; keySeq = ""; group = "Speed";
|
||||||
|
break;
|
||||||
|
case HK_SPEED_HALF:
|
||||||
|
name = "1/2x Speed"; keySeq = ""; group = "Speed";
|
||||||
|
break;
|
||||||
|
case HK_SPEED_2X:
|
||||||
|
name = "2x Speed"; keySeq = ""; group = "Speed";
|
||||||
|
break;
|
||||||
|
case HK_SPEED_4X:
|
||||||
|
name = "4x Speed"; keySeq = ""; group = "Speed";
|
||||||
|
break;
|
||||||
|
case HK_SPEED_8X:
|
||||||
|
name = "8x Speed"; keySeq = ""; group = "Speed";
|
||||||
|
break;
|
||||||
|
case HK_SPEED_16X:
|
||||||
|
name = "16x Speed"; keySeq = ""; group = "Speed";
|
||||||
|
break;
|
||||||
case HK_TOGGLE_INPUT_DISPLAY:
|
case HK_TOGGLE_INPUT_DISPLAY:
|
||||||
name = "ToggleInputDisplay"; keySeq = ","; group = "Misc";
|
name = "ToggleInputDisplay"; keySeq = ","; group = "Misc";
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -18,6 +18,8 @@ enum HOTKEY {
|
||||||
|
|
||||||
// Emulation Execution Control
|
// Emulation Execution Control
|
||||||
HK_FRAME_ADVANCE, HK_DECREASE_SPEED, HK_INCREASE_SPEED, HK_TURBO,
|
HK_FRAME_ADVANCE, HK_DECREASE_SPEED, HK_INCREASE_SPEED, HK_TURBO,
|
||||||
|
HK_SPEED_QUARTER, HK_SPEED_HALF, HK_SPEED_NORMAL,
|
||||||
|
HK_SPEED_2X, HK_SPEED_4X, HK_SPEED_8X, HK_SPEED_16X,
|
||||||
|
|
||||||
// Save States
|
// Save States
|
||||||
HK_SAVE_STATE,
|
HK_SAVE_STATE,
|
||||||
|
|
Loading…
Reference in New Issue