diff options
author | Franco M <francomaro@gmail.com> | 2023-10-26 19:11:15 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-26 19:11:15 -0300 |
commit | b5415b687203599fe18e2cefc78700e4c6f2ae7c (patch) | |
tree | ddd4c82cab9e367cdcf2bbf4a1d444f85ed0b02e /src/yuzu/configuration/configure_hotkeys.cpp | |
parent | b76a1d987ff83b831a19a0c19f9fcd96c504c077 (diff) | |
parent | 43be2bfe332d5537041262eb08037993239eaf5f (diff) |
Merge branch 'yuzu-emu:master' into new-shortcut
Diffstat (limited to 'src/yuzu/configuration/configure_hotkeys.cpp')
-rw-r--r-- | src/yuzu/configuration/configure_hotkeys.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/yuzu/configuration/configure_hotkeys.cpp b/src/yuzu/configuration/configure_hotkeys.cpp index 0b2a965f8..68e21cd84 100644 --- a/src/yuzu/configuration/configure_hotkeys.cpp +++ b/src/yuzu/configuration/configure_hotkeys.cpp @@ -319,6 +319,13 @@ void ConfigureHotkeys::ApplyConfiguration(HotkeyRegistry& registry) { void ConfigureHotkeys::RestoreDefaults() { for (int r = 0; r < model->rowCount(); ++r) { const QStandardItem* parent = model->item(r, 0); + const int hotkey_size = static_cast<int>(Config::default_hotkeys.size()); + + if (hotkey_size != parent->rowCount()) { + QMessageBox::warning(this, tr("Invalid hotkey settings"), + tr("An error occurred. Please report this issue on github.")); + return; + } for (int r2 = 0; r2 < parent->rowCount(); ++r2) { model->item(r, 0) |