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:
parent
9e8341cf88
commit
6bc596d3a7
4 changed files with 17 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue