From 2aa8f96e9ced4a5e3f39212545eed90b623f7238 Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Fri, 18 Jul 2025 04:07:22 +0300 Subject: [PATCH] More nits Co-Authored-By: Paris Oplopoios --- src/panda_qt/main_window.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/panda_qt/main_window.cpp b/src/panda_qt/main_window.cpp index 57d37d59..b592226b 100644 --- a/src/panda_qt/main_window.cpp +++ b/src/panda_qt/main_window.cpp @@ -779,12 +779,12 @@ void MainWindow::setupControllerSensors(SDL_GameController* controller) { } void MainWindow::loadKeybindings() { - auto keyMappings = InputMappings::deserialize(emu->getAppDataRoot() / "controls_qt.toml", "Qt", [](const std::string& name) { + auto mappings = InputMappings::deserialize(emu->getAppDataRoot() / "controls_qt.toml", "Qt", [](const std::string& name) { return InputMappings::Scancode(QKeySequence(QString::fromStdString(name))[0].key()); }); - if (keyMappings) { - keyboardMappings = *keyMappings; + if (mappings.has_value()) { + keyboardMappings = *mappings; } else { keyboardMappings = InputMappings::defaultKeyboardMappings(); }