diff --git a/Core/HLE/sceUmd.cpp b/Core/HLE/sceUmd.cpp index f293a72d2b..ef1db423e8 100644 --- a/Core/HLE/sceUmd.cpp +++ b/Core/HLE/sceUmd.cpp @@ -540,16 +540,13 @@ bool getUMDReplacePermit() { return UMDReplacePermit; } -static u32 sceUmdReplaceProhibit() -{ +static u32 sceUmdReplaceProhibit() { UMDReplacePermit = false; DEBUG_LOG(SCEIO,"sceUmdReplaceProhibit()"); - host->UpdateUI(); return 0; } -static u32 sceUmdReplacePermit() -{ +static u32 sceUmdReplacePermit() { UMDReplacePermit = true; DEBUG_LOG(SCEIO,"sceUmdReplacePermit()"); host->UpdateUI(); diff --git a/Windows/MainWindow.cpp b/Windows/MainWindow.cpp index 1e7012ccfe..e5ab81cfcd 100644 --- a/Windows/MainWindow.cpp +++ b/Windows/MainWindow.cpp @@ -880,9 +880,10 @@ namespace MainWindow break; case WM_MENUSELECT: - // Unfortunately, accelerate keys (hotkeys) shares the same enabled/disabled states - // with corresponding menu items. + // Called when a menu is opened. Also when an item is selected, but meh. + // This is a good place to update the enabled/disabled state of menu items. UpdateMenus(); + SetIngameMenuItemStates(menu, GetUIState()); WindowsRawInput::NotifyMenu(); break; diff --git a/Windows/MainWindowMenu.cpp b/Windows/MainWindowMenu.cpp index dc408b7687..7d3c447681 100644 --- a/Windows/MainWindowMenu.cpp +++ b/Windows/MainWindowMenu.cpp @@ -337,10 +337,6 @@ namespace MainWindow { // Help menu: it's translated in CreateHelpMenu. CreateHelpMenu(menu); - // TODO: Urgh! Why do we need this here? - // The menu is supposed to enable/disable this stuff directly afterward. - SetIngameMenuItemStates(menu, GetUIState()); - DrawMenuBar(hWnd); UpdateMenus(); } diff --git a/Windows/MainWindowMenu.h b/Windows/MainWindowMenu.h index 01115aee41..673681a292 100644 --- a/Windows/MainWindowMenu.h +++ b/Windows/MainWindowMenu.h @@ -12,4 +12,5 @@ namespace MainWindow { void BrowseBackground(); void BrowseBackgroundDone(); void setTexScalingMultiplier(int level); + void SetIngameMenuItemStates(HMENU menu, const GlobalUIState state); }