diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index 3f09c61bdc..31f7fe761d 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -48,8 +48,8 @@ class SingleControlMapper : public UI::LinearLayout { public: SingleControlMapper(int pspKey, std::string keyName, ScreenManager *scrm, UI::LinearLayoutParams *layoutParams = nullptr); - void Update() override; int GetPspKey() const { return pspKey_; } + private: void Refresh(); @@ -76,7 +76,6 @@ private: int pspKey_; std::string keyName_; ScreenManager *scrm_; - bool refresh_ = false; }; SingleControlMapper::SingleControlMapper(int pspKey, std::string keyName, ScreenManager *scrm, UI::LinearLayoutParams *layoutParams) @@ -84,14 +83,6 @@ SingleControlMapper::SingleControlMapper(int pspKey, std::string keyName, Screen Refresh(); } -void SingleControlMapper::Update() { - if (refresh_) { - refresh_ = false; - Refresh(); - host->UpdateUI(); - } -} - void SingleControlMapper::Refresh() { Clear(); auto mc = GetI18NCategory("MappableControls"); @@ -187,8 +178,6 @@ void SingleControlMapper::MappedCallback(KeyDef kdf) { break; } g_Config.bMapMouse = false; - refresh_ = true; - // After this, we do not exist any more. So the refresh_ = true is probably irrelevant. } UI::EventReturn SingleControlMapper::OnReplace(UI::EventParams ¶ms) { @@ -224,7 +213,6 @@ UI::EventReturn SingleControlMapper::OnDelete(UI::EventParams ¶ms) { int index = atoi(params.v->Tag().c_str()); KeyMap::g_controllerMap[pspKey_].erase(KeyMap::g_controllerMap[pspKey_].begin() + index); KeyMap::g_controllerMapGeneration++; - refresh_ = true; if (index + 1 < rows_.size()) rows_[index]->SetFocus();