mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
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
@ -466,6 +466,9 @@ namespace MainWindow
|
||||
for (int i = 0; i < GetMenuItemCount(menu); i++) {
|
||||
SetMenuInfo(GetSubMenu(menu,i), &info);
|
||||
}
|
||||
|
||||
// Always translate first: translating resets the menu.
|
||||
TranslateMenus(hwndMain, menu);
|
||||
UpdateMenus();
|
||||
|
||||
// Accept dragged files.
|
||||
|
@ -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…
Reference in New Issue
Block a user