From 099e3c67b25ac7da0af75d21df92fa5bcbb92522 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Fri, 24 Jan 2025 20:24:41 +0100 Subject: [PATCH] Qt: fix recent savestate shortcuts --- rpcs3/rpcs3qt/main_window.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index 3e521f0729..77bcb7f148 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -2242,7 +2242,7 @@ void main_window::BootRecentAction(const QAction* act, bool is_savestate) // refill menu with actions for (int i = 0; i < rgw.actions.count(); i++) { - rgw.actions[i]->setShortcut(tr("Ctrl+%1").arg(i + 1)); + rgw.actions[i]->setShortcut(QString("%0+%1").arg(is_savestate ? "Alt" : "Ctrl").arg(i + 1)); rgw.actions[i]->setToolTip(::at32(rgw.entries, i).second); menu->addAction(rgw.actions[i]); } @@ -2289,7 +2289,7 @@ QAction* main_window::CreateRecentAction(const q_string_pair& entry, u32 sc_idx, QAction* act = new QAction(shown_name, this); act->setData(entry.first); act->setToolTip(entry.second); - act->setShortcut(tr("Ctrl+%1").arg(sc_idx)); + act->setShortcut(QString("%0+%1").arg(is_savestate ? "Alt" : "Ctrl").arg(sc_idx)); // truncate if too long if (shown_name.length() > 60) @@ -2360,7 +2360,7 @@ void main_window::AddRecentAction(const q_string_pair& entry, bool is_savestate) // refill menu with actions for (int i = 0; i < rgw.actions.count(); i++) { - rgw.actions[i]->setShortcut(tr("Ctrl+%1").arg(i + 1)); + rgw.actions[i]->setShortcut(QString("%0+%1").arg(is_savestate ? "Alt" : "Ctrl").arg(i + 1)); rgw.actions[i]->setToolTip(::at32(rgw.entries, i).second); menu->addAction(rgw.actions[i]); }