mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Add hotkeys for incrementing/decrementing selected state slot (like RetroArch)
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user