SwicthUMD:Only update Switch UMD item of Windows menu instead of entire UI.

This commit is contained in:
shenweip committed 2020-10-22 17:45:29 +08:00
1 parent 0f647684a3
commit a0fe0e38c1
11 files changed
+37 -4

No files matched your search

+7
View File
@@ -1379,6 +1379,13 @@ namespace MainWindow {
TranslateMenuItem(menu, ID_TOGGLE_BREAK, L"\tF8", isPaused ? "Run" : "Break");
}
void UpdateSwitchUMD() {
HMENU menu = GetMenu(GetHWND());
GlobalUIState state = GetUIState();
UINT umdSwitchEnable = state == UISTATE_INGAME && getUMDReplacePermit() ? MF_ENABLED : MF_GRAYED;
EnableMenuItem(menu, ID_EMULATION_SWITCH_UMD, umdSwitchEnable);
}
// Message handler for about box.
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) {
switch (message) {