Windows: Fix check state after menu translate.
The caching in SetIngameMenuItemStates was pointless, and buggy on language change.
This commit is contained in:
parent
47284905a4
commit
c3a4f53755
2 changed files with 3 additions and 9 deletions
|
@ -53,15 +53,6 @@ namespace MainWindow {
|
|||
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
void SetIngameMenuItemStates(HMENU menu, const GlobalUIState state) {
|
||||
static GlobalUIState lastGlobalUIState = UISTATE_PAUSEMENU;
|
||||
static bool lastUMDPermit = false;
|
||||
|
||||
if (lastGlobalUIState == GetUIState() && lastUMDPermit == getUMDReplacePermit())
|
||||
return;
|
||||
|
||||
lastGlobalUIState = GetUIState();
|
||||
lastUMDPermit = getUMDReplacePermit();
|
||||
|
||||
UINT menuEnable = state == UISTATE_INGAME ? MF_ENABLED : MF_GRAYED;
|
||||
UINT umdSwitchEnable = state == UISTATE_INGAME && getUMDReplacePermit() ? MF_ENABLED : MF_GRAYED;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue