@@ -57,7 +57,9 @@ using KeyMap::MultiInputMapping;
5757class SingleControlMapper : public UI ::LinearLayout {
5858public:
5959 SingleControlMapper (int pspKey, std::string keyName, ScreenManager *scrm, UI ::LinearLayoutParams *layoutParams = nullptr );
60-
60+ ~SingleControlMapper () {
61+ g_IsMappingMouseInput = false ;
62+ }
6163 int GetPspKey () const { return pspKey_; }
6264
6365private:
@@ -196,7 +198,7 @@ void SingleControlMapper::MappedCallback(const MultiInputMapping &kdf) {
196198 break ;
197199 }
198200 KeyMap::UpdateNativeMenuKeys ();
199- g_Config. bMapMouse = false ;
201+ g_IsMappingMouseInput = false ;
200202}
201203
202204UI ::EventReturn SingleControlMapper::OnReplace (UI ::EventParams ¶ms) {
@@ -219,7 +221,7 @@ UI::EventReturn SingleControlMapper::OnAdd(UI::EventParams ¶ms) {
219221}
220222UI ::EventReturn SingleControlMapper::OnAddMouse (UI ::EventParams ¶ms) {
221223 action_ = ADD ;
222- g_Config. bMapMouse = true ;
224+ g_IsMappingMouseInput = true ;
223225 scrm_->push (new KeyMappingNewMouseKeyDialog (pspKey_, true , std::bind (&SingleControlMapper::MappedCallback, this , std::placeholders::_1), I18NCat::KEYMAPPING ));
224226 return UI ::EVENT_DONE ;
225227}
@@ -430,14 +432,14 @@ bool KeyMappingNewMouseKeyDialog::key(const KeyInput &key) {
430432 if (key.flags & KEY_DOWN ) {
431433 if (key.keyCode == NKCODE_ESCAPE ) {
432434 TriggerFinish (DR_OK );
433- g_Config. bMapMouse = false ;
435+ g_IsMappingMouseInput = false ;
434436 return false ;
435437 }
436438
437439 mapped_ = true ;
438440
439441 TriggerFinish (DR_YES );
440- g_Config. bMapMouse = false ;
442+ g_IsMappingMouseInput = false ;
441443 if (callback_) {
442444 MultiInputMapping kdf (InputMapping (key.deviceId , key.keyCode ));
443445 callback_ (kdf);
0 commit comments