mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-20 17:59:08 +02:00
Windows: Hide accelerators when they are disabled.
Currently, mapping something to load state / save state / etc. causes the default accelerators to become disabled. In this case, it can be confusing when the menu still shows them. Fixes #11395.
This commit is contained in:
1 parent
9e8341cf88
commit
6bc596d3a7
4 files changed
+17
-4
No files matched your search
@@ -29,6 +29,7 @@
|
||||
#include "ui/view.h"
|
||||
#include "ui/viewgroup.h"
|
||||
|
||||
#include "Core/Host.h"
|
||||
#include "Core/HLE/sceCtrl.h"
|
||||
#include "Core/System.h"
|
||||
#include "Common/KeyMap.h"
|
||||
@@ -79,6 +80,7 @@ void ControlMapper::Update() {
|
||||
if (refresh_) {
|
||||
refresh_ = false;
|
||||
Refresh();
|
||||
host->UpdateUI();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,6 +171,7 @@ void ControlMapper::MappedCallback(KeyDef kdf) {
|
||||
break;
|
||||
case REPLACEONE:
|
||||
KeyMap::g_controllerMap[pspKey_][actionIndex_] = kdf;
|
||||
KeyMap::g_controllerMapGeneration++;
|
||||
break;
|
||||
default:
|
||||
;
|
||||
@@ -211,6 +214,7 @@ UI::EventReturn ControlMapper::OnAddMouse(UI::EventParams ¶ms) {
|
||||
UI::EventReturn ControlMapper::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;
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user