mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Merge pull request #10962 from askew-etc/inc-dec-select-state-hotkeys
Add hotkeys for incrementing/decrementing select state slot
This commit is contained in:
@ -490,6 +490,12 @@ void HotkeyScheduler::Run()
|
||||
if (IsHotkey(HK_LOAD_STATE_SLOT_SELECTED))
|
||||
emit StateLoadSlotHotkey();
|
||||
|
||||
if (IsHotkey(HK_INCREMENT_SELECTED_STATE_SLOT))
|
||||
emit IncrementSelectedStateSlotHotkey();
|
||||
|
||||
if (IsHotkey(HK_DECREMENT_SELECTED_STATE_SLOT))
|
||||
emit DecrementSelectedStateSlotHotkey();
|
||||
|
||||
// Stereoscopy
|
||||
if (IsHotkey(HK_TOGGLE_STEREO_SBS))
|
||||
{
|
||||
|
@ -36,6 +36,8 @@ signals:
|
||||
void ScreenShotHotkey();
|
||||
void RefreshGameListHotkey();
|
||||
void SetStateSlotHotkey(int slot);
|
||||
void IncrementSelectedStateSlotHotkey();
|
||||
void DecrementSelectedStateSlotHotkey();
|
||||
void StateLoadSlotHotkey();
|
||||
void StateSaveSlotHotkey();
|
||||
void StateLoadSlot(int state);
|
||||
|
@ -595,6 +595,10 @@ void MainWindow::ConnectHotkeys()
|
||||
&MainWindow::StateSaveSlot);
|
||||
connect(m_hotkey_scheduler, &HotkeyScheduler::SetStateSlotHotkey, this,
|
||||
&MainWindow::SetStateSlot);
|
||||
connect(m_hotkey_scheduler, &HotkeyScheduler::IncrementSelectedStateSlotHotkey, this,
|
||||
&MainWindow::IncrementSelectedStateSlot);
|
||||
connect(m_hotkey_scheduler, &HotkeyScheduler::DecrementSelectedStateSlotHotkey, this,
|
||||
&MainWindow::DecrementSelectedStateSlot);
|
||||
connect(m_hotkey_scheduler, &HotkeyScheduler::StartRecording, this,
|
||||
&MainWindow::OnStartRecording);
|
||||
connect(m_hotkey_scheduler, &HotkeyScheduler::PlayRecording, this, &MainWindow::OnPlayRecording);
|
||||
@ -1358,6 +1362,22 @@ void MainWindow::SetStateSlot(int slot)
|
||||
2500);
|
||||
}
|
||||
|
||||
void MainWindow::IncrementSelectedStateSlot()
|
||||
{
|
||||
int state_slot = m_state_slot + 1;
|
||||
if (state_slot > State::NUM_STATES)
|
||||
state_slot = 1;
|
||||
m_menu_bar->SetStateSlot(state_slot);
|
||||
}
|
||||
|
||||
void MainWindow::DecrementSelectedStateSlot()
|
||||
{
|
||||
int state_slot = m_state_slot - 1;
|
||||
if (state_slot < 1)
|
||||
state_slot = State::NUM_STATES;
|
||||
m_menu_bar->SetStateSlot(state_slot);
|
||||
}
|
||||
|
||||
void MainWindow::PerformOnlineUpdate(const std::string& region)
|
||||
{
|
||||
WiiUpdate::PerformOnlineUpdate(region, this);
|
||||
|
@ -102,6 +102,8 @@ private:
|
||||
void StateSaveUndo();
|
||||
void StateSaveOldest();
|
||||
void SetStateSlot(int slot);
|
||||
void IncrementSelectedStateSlot();
|
||||
void DecrementSelectedStateSlot();
|
||||
void BootWiiSystemMenu();
|
||||
|
||||
void PerformOnlineUpdate(const std::string& region);
|
||||
|
Reference in New Issue
Block a user