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:
Unknown W. Brackets committed 2019-02-17 12:17:41 -08:00
1 parent 9e8341cf88
commit 6bc596d3a7
4 files changed
+17 -4

No files matched your search

+3
View File
@@ -44,6 +44,7 @@ struct DefMappingStruct {
};
KeyMapping g_controllerMap;
int g_controllerMapGeneration = 0;
std::set<std::string> g_seenPads;
bool g_swapped_keys = false;
@@ -833,6 +834,7 @@ void SetKeyMapping(int btn, KeyDef key, bool replace) {
}
g_controllerMap[btn].push_back(key);
}
g_controllerMapGeneration++;
UpdateNativeMenuKeys();
}
@@ -956,6 +958,7 @@ void AutoConfForPad(const std::string &name) {
// Add a couple of convenient keyboard mappings by default, too.
g_controllerMap[VIRTKEY_PAUSE].push_back(KeyDef(DEVICE_ID_KEYBOARD, NKCODE_ESCAPE));
g_controllerMap[VIRTKEY_UNTHROTTLE].push_back(KeyDef(DEVICE_ID_KEYBOARD, NKCODE_TAB));
g_controllerMapGeneration++;
#endif
}