From 07ad4f63fafe50922fdeb70a9eedc442e4549f53 Mon Sep 17 00:00:00 2001 From: Albert Liu <45282415+ggrtk@users.noreply.github.com> Date: Wed, 24 Feb 2021 20:32:32 -0800 Subject: [PATCH] FullscreenUI: Update type cache when controller type is changed --- src/frontend-common/fullscreen_ui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontend-common/fullscreen_ui.cpp b/src/frontend-common/fullscreen_ui.cpp index b60aa487b..4775aeb6a 100644 --- a/src/frontend-common/fullscreen_ui.cpp +++ b/src/frontend-common/fullscreen_ui.cpp @@ -1540,7 +1540,7 @@ void DrawSettingsWindow() CommonHostInterface::InputProfileList profiles(s_host_interface->GetInputProfileList()); ImGuiFullscreen::ChoiceDialogOptions options; options.reserve(profiles.size()); - for (const CommonHostInterface::InputProfileEntry& entry : profiles) + for (CommonHostInterface::InputProfileEntry& entry : profiles) options.emplace_back(std::move(entry.name), false); auto callback = [profiles](s32 index, const std::string& title, bool checked) { @@ -1574,6 +1574,7 @@ void DrawSettingsWindow() const ControllerType ctype = s_settings_copy.controller_types[port]; if (ctype != type_cache[port]) { + type_cache[port] = ctype; button_cache[port] = Controller::GetButtonNames(ctype); axis_cache[port] = Controller::GetAxisNames(ctype); setting_cache[port] = Controller::GetSettings(ctype);