From ebba9f5a70f26376dee2e893788151d9624a76a4 Mon Sep 17 00:00:00 2001 From: Adityarup Laha <30696515+adityaruplaha@users.noreply.github.com> Date: Fri, 5 Apr 2019 09:46:01 +0530 Subject: [PATCH] ConfigureInput::GetUsedKeyboardKeys(): Change index of home button to use NativeButton instead of magic number. Fixes a bug where users can't bind anything to the B key. Arises because this was not changed in #4537. --- src/citra_qt/configuration/configure_input.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/citra_qt/configuration/configure_input.cpp b/src/citra_qt/configuration/configure_input.cpp index da5f64271..cd7e17f04 100644 --- a/src/citra_qt/configuration/configure_input.cpp +++ b/src/citra_qt/configuration/configure_input.cpp @@ -287,16 +287,16 @@ void ConfigureInput::OnHotkeysChanged(QList new_key_list) { QList ConfigureInput::GetUsedKeyboardKeys() { QList list; for (int button = 0; button < Settings::NativeButton::NumButtons; button++) { - auto button_param = buttons_param[button]; + // TODO(adityaruplaha): Add home button to list when we finally emulate it + if (button == Settings::NativeButton::Home) { + continue; + } + auto button_param = buttons_param[button]; if (button_param.Get("engine", "") == "keyboard") { list << QKeySequence(button_param.Get("code", 0)); } } - - // TODO(adityaruplaha): Add home button to list when we finally emulate it - // Button ID of home button is 14: Referred from citra_qt/configuration/config.cpp - list.removeOne(list.indexOf(QKeySequence(buttons_param[14].Get("code", 0)))); return list; }