qt: Rename Per-Application Speed, change shortcut to CTRL+U

This commit is contained in:
RedBlackAka 2026-01-27 11:35:23 +01:00
parent 0a705b7449
commit 4355dfae4e
3 changed files with 9 additions and 9 deletions

View File

@ -827,7 +827,7 @@ void GMainWindow::InitializeHotkeys() {
ToggleFullscreen();
}
});
connect_shortcut(QStringLiteral("Toggle Per-Application Speed"), [&] {
connect_shortcut(QStringLiteral("Toggle Framerate Limit"), [&] {
if (!hotkey_registry
.GetKeySequence(QStringLiteral("Main Window"), QStringLiteral("Toggle Turbo Mode"))
.isEmpty()) {

View File

@ -88,7 +88,7 @@ const std::array<UISettings::Shortcut, 38> QtConfig::default_hotkeys {{
{QStringLiteral("Toggle Custom Textures"), QStringLiteral("Main Window"), {QStringLiteral("F7"), Qt::ApplicationShortcut}},
{QStringLiteral("Toggle Filter Bar"), QStringLiteral("Main Window"), {QStringLiteral("Ctrl+F"), Qt::WindowShortcut}},
{QStringLiteral("Toggle Frame Advancing"), QStringLiteral("Main Window"), {QStringLiteral("Ctrl+A"), Qt::ApplicationShortcut}},
{QStringLiteral("Toggle Per-Application Speed"), QStringLiteral("Main Window"), {QStringLiteral("Ctrl+Z"), Qt::ApplicationShortcut}},
{QStringLiteral("Toggle Framerate Limit"), QStringLiteral("Main Window"), {QStringLiteral("Ctrl+U"), Qt::ApplicationShortcut}},
{QStringLiteral("Toggle Screen Layout"), QStringLiteral("Main Window"), {QStringLiteral("F10"), Qt::WindowShortcut}},
{QStringLiteral("Toggle Status Bar"), QStringLiteral("Main Window"), {QStringLiteral("Ctrl+S"), Qt::WindowShortcut}},
{QStringLiteral("Toggle Texture Dumping"), QStringLiteral("Main Window"), {QStringLiteral(""), Qt::ApplicationShortcut}},

View File

@ -98,16 +98,16 @@ void ConfigureHotkeys::Configure(QModelIndex index) {
}
const auto [key_sequence_used, used_action] = IsUsedKey(key_sequence);
// Check for turbo/per-game speed conflict. Needed to prevent the user from binding both hotkeys
// to the same action. Which cuases problems resetting the frame limit.to the inititla value.
// Check for turbo/framerate limit conflict. Needed to prevent the user from binding both
// hotkeys to the same action, which causes problems when resetting the frame limit to the
// initital value
const QString current_action =
model->data(model->index(index.row(), 0, index.parent())).toString();
const bool is_turbo = current_action == tr("Toggle Turbo Mode");
const bool is_per_game = current_action == tr("Toggle Per-Application Speed");
const bool is_frame_limit = current_action == tr("Toggle Framerate Limit");
if (is_turbo || is_per_game) {
QString other_action =
is_turbo ? tr("Toggle Per-Application Speed") : tr("Toggle Turbo Mode");
if (is_turbo || is_frame_limit) {
QString other_action = is_turbo ? tr("Toggle Framerate Limit") : tr("Toggle Turbo Mode");
QKeySequence other_sequence;
for (int r = 0; r < model->rowCount(); ++r) {
@ -124,7 +124,7 @@ void ConfigureHotkeys::Configure(QModelIndex index) {
// Show warning if either hotkey is already set
if (!key_sequence.isEmpty() && !other_sequence.isEmpty()) {
QMessageBox::warning(this, tr("Conflicting Key Sequence"),
tr("The per-application speed and turbo speed hotkeys cannot be "
tr("The frame limit and turbo speed hotkeys cannot be "
"bound at the same time."));
return;
}