From 01d4ed0bc3692ad1ea366f20d94b519bf9a3c41b Mon Sep 17 00:00:00 2001 From: oddMLan Date: Sun, 17 Mar 2019 18:04:05 -0700 Subject: [PATCH] Change some error message boxes to warnings --- Source/Project64-core/Multilanguage.h | 3 ++- .../Multilanguage/LanguageClass.cpp | 3 ++- .../N64System/Interpreter/InterpreterOps.cpp | 2 +- Source/Project64-core/Notification.h | 3 +++ .../Project64/UserInterface/CheatClassUI.cpp | 2 +- .../Debugger/Debugger-MemoryDump.cpp | 2 +- .../UserInterface/EnhancementConfig.cpp | 2 +- Source/Project64/UserInterface/MainMenu.cpp | 4 ++-- Source/Project64/UserInterface/MainWindow.cpp | 6 +++--- .../Project64/UserInterface/Notification.cpp | 19 +++++++++++++++++-- Source/Project64/UserInterface/Notification.h | 3 +++ .../UserInterface/RomBrowserClass.cpp | 2 +- .../Settings/SettingsPage-Game-Plugin.cpp | 8 +++----- .../SettingsPage-KeyboardShortcuts.cpp | 14 +++++++------- .../Settings/SettingsPage-Plugin.cpp | 6 ++---- Source/Project64/main.cpp | 2 +- 16 files changed, 50 insertions(+), 31 deletions(-) diff --git a/Source/Project64-core/Multilanguage.h b/Source/Project64-core/Multilanguage.h index b6eae4ed4..f9aa8bf0e 100644 --- a/Source/Project64-core/Multilanguage.h +++ b/Source/Project64-core/Multilanguage.h @@ -523,7 +523,7 @@ enum LanguageStringID MSG_UNHANDLED_OP = 2022, MSG_NONMAPPED_SPACE = 2023, MSG_SAVE_STATE_HEADER = 2024, - MSG_MSGBOX_TITLE = 2025, + MSG_MSGBOX_ERROR_TITLE = 2025, MSG_PIF2_ERROR = 2026, MSG_PIF2_TITLE = 2027, MSG_PLUGIN_CHANGE = 2028, @@ -558,6 +558,7 @@ enum LanguageStringID MSG_SET_HLE_AUD_MSG = 2057, MSG_FAIL_IMAGE_IPL = 2058, MSG_IPL_REQUIRED = 2059, + MSG_MSGBOX_WARNING_TITLE = 2060, /********************************************************************************* * Android * diff --git a/Source/Project64-core/Multilanguage/LanguageClass.cpp b/Source/Project64-core/Multilanguage/LanguageClass.cpp index d8c070a0b..602e7fa74 100644 --- a/Source/Project64-core/Multilanguage/LanguageClass.cpp +++ b/Source/Project64-core/Multilanguage/LanguageClass.cpp @@ -489,7 +489,8 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(MSG_UNHANDLED_OP, "Unhandled R4300i opcode at"); DEF_STR(MSG_NONMAPPED_SPACE, "Executing from non-mapped space.\n\nVerify ROM and its settings."); DEF_STR(MSG_SAVE_STATE_HEADER, "This saved state does not appear to match the running ROM.\n\nStates must be saved & loaded between 100% identical ROMs.\nIn particular, the REGION and VERSION need to be the same.\nLoading this state is likely to cause the game and/or emulator to crash.\n\nAre you sure you want to continue loading?"); - DEF_STR(MSG_MSGBOX_TITLE, "Error"); + DEF_STR(MSG_MSGBOX_WARNING_TITLE, "Warning"); + DEF_STR(MSG_MSGBOX_ERROR_TITLE, "Error"); DEF_STR(MSG_PIF2_ERROR, "Copyright sequence not found in LUT. Game will no longer function."); DEF_STR(MSG_PIF2_TITLE, "Copy Protection Failure"); DEF_STR(MSG_PLUGIN_CHANGE, "Changing a plugin requires Project64 to reset a running ROM.\nIf you don't want to lose your place, answer No and save the current state first.\n\nChange plugins and reset ROM now?"); diff --git a/Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp b/Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp index d1647e0f6..0bc60a890 100644 --- a/Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp +++ b/Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp @@ -3006,7 +3006,7 @@ void R4300iOp::UnknownOpcode() strcat(Message, "\n\nDo you wish to enter the debugger ?"); - response = MessageBox(NULL, Message, GS(MSG_MSGBOX_TITLE), MB_YESNO | MB_ICONERROR); + response = MessageBox(NULL, Message, GS(MSG_MSGBOX_ERROR_TITLE), MB_YESNO | MB_ICONERROR); if (response == IDYES) { Enter_R4300i_Commands_Window(); diff --git a/Source/Project64-core/Notification.h b/Source/Project64-core/Notification.h index 176409f47..fd14bfb19 100644 --- a/Source/Project64-core/Notification.h +++ b/Source/Project64-core/Notification.h @@ -17,6 +17,9 @@ public: virtual void FatalError(LanguageStringID StringID) const = 0; //User Feedback + virtual void DisplayWarning(const char * Message) const = 0; + virtual void DisplayWarning(LanguageStringID StringID) const = 0; + virtual void DisplayMessage(int DisplayTime, const char * Message) const = 0; virtual void DisplayMessage(int DisplayTime, LanguageStringID StringID) const = 0; virtual void DisplayMessage2(const char * Message) const = 0; diff --git a/Source/Project64/UserInterface/CheatClassUI.cpp b/Source/Project64/UserInterface/CheatClassUI.cpp index fc5cb35a7..b7196fba6 100644 --- a/Source/Project64/UserInterface/CheatClassUI.cpp +++ b/Source/Project64/UserInterface/CheatClassUI.cpp @@ -301,7 +301,7 @@ int CALLBACK CCheatsUI::CheatAddProc(HWND hDlg, uint32_t uMsg, uint32_t wParam, } if (_stricmp(CheatName.c_str(), NewCheatName.c_str()) == 0) { - g_Notify->DisplayError(GS(MSG_CHEAT_NAME_IN_USE)); + g_Notify->DisplayWarning(GS(MSG_CHEAT_NAME_IN_USE)); SetFocus(GetDlgItem(hDlg, IDC_CODE_NAME)); return true; } diff --git a/Source/Project64/UserInterface/Debugger/Debugger-MemoryDump.cpp b/Source/Project64/UserInterface/Debugger/Debugger-MemoryDump.cpp index 2d2aec9a3..0263c62e4 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-MemoryDump.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-MemoryDump.cpp @@ -112,7 +112,7 @@ LRESULT CDumpMemory::OnClicked(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, GetDlgItemText(IDC_FILENAME, FileName, sizeof(FileName)); if (strlen(FileName) == 0) { - g_Notify->DisplayError("Please Choose target file"); + g_Notify->DisplayWarning("Please Choose target file"); ::SetFocus(GetDlgItem(IDC_FILENAME)); return false; } diff --git a/Source/Project64/UserInterface/EnhancementConfig.cpp b/Source/Project64/UserInterface/EnhancementConfig.cpp index f6f038234..4528d100b 100644 --- a/Source/Project64/UserInterface/EnhancementConfig.cpp +++ b/Source/Project64/UserInterface/EnhancementConfig.cpp @@ -577,7 +577,7 @@ LRESULT CEditEnhancement::OnOkCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl } if (_stricmp(Name.c_str(), NewName.c_str()) == 0) { - g_Notify->DisplayError(GS(MSG_CHEAT_NAME_IN_USE)); + g_Notify->DisplayWarning(GS(MSG_CHEAT_NAME_IN_USE)); GetDlgItem(IDC_CODE_NAME).SetFocus(); return true; } diff --git a/Source/Project64/UserInterface/MainMenu.cpp b/Source/Project64/UserInterface/MainMenu.cpp index bcb439e30..d324abb53 100644 --- a/Source/Project64/UserInterface/MainMenu.cpp +++ b/Source/Project64/UserInterface/MainMenu.cpp @@ -128,7 +128,7 @@ void CMainMenu::OnOpenRom(HWND hWnd) // Open Disk if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists() || !g_BaseSystem->RunDiskImage(File.c_str())) { - if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists()) { g_Notify->DisplayError(MSG_IPL_REQUIRED); } + if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists()) { g_Notify->DisplayWarning(MSG_IPL_REQUIRED); } CPath FileNameIPL; const char * Filter = "64DD IPL ROM Image (*.zip, *.7z, *.?64, *.rom, *.usa, *.jap, *.pal, *.bin)\0*.?64;*.zip;*.7z;*.bin;*.rom;*.usa;*.jap;*.pal\0All files (*.*)\0*.*\0"; if (FileNameIPL.SelectFile(hWnd, g_Settings->LoadStringVal(RomList_GameDir).c_str(), Filter, true)) @@ -553,7 +553,7 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI { if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists() || !g_BaseSystem->RunDiskImage(FileName.c_str())) { - if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists()) { g_Notify->DisplayError(MSG_IPL_REQUIRED); } + if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists()) { g_Notify->DisplayWarning(MSG_IPL_REQUIRED); } CPath FileNameIPL; const char * Filter = "64DD IPL ROM Image (*.zip, *.7z, *.?64, *.rom, *.usa, *.jap, *.pal, *.bin)\0*.?64;*.zip;*.7z;*.bin;*.rom;*.usa;*.jap;*.pal\0All files (*.*)\0*.*\0"; if (FileNameIPL.SelectFile(hWnd, g_Settings->LoadStringVal(RomList_GameDir).c_str(), Filter, true)) diff --git a/Source/Project64/UserInterface/MainWindow.cpp b/Source/Project64/UserInterface/MainWindow.cpp index 6bdd600e5..adc3d4d22 100644 --- a/Source/Project64/UserInterface/MainWindow.cpp +++ b/Source/Project64/UserInterface/MainWindow.cpp @@ -991,7 +991,7 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO { if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists() || !g_BaseSystem->RunDiskImage(_this->CurrentedSelectedRom())) { - if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists()) { g_Notify->DisplayError(MSG_IPL_REQUIRED); } + if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists()) { g_Notify->DisplayWarning(MSG_IPL_REQUIRED); } CPath FileName; const char * Filter = "64DD IPL ROM Image (*.zip, *.7z, *.?64, *.rom, *.usa, *.jap, *.pal, *.bin)\0*.?64;*.zip;*.7z;*.bin;*.rom;*.usa;*.jap;*.pal\0All files (*.*)\0*.*\0"; if (FileName.SelectFile(hWnd, g_Settings->LoadStringVal(RomList_GameDir).c_str(), Filter, true)) @@ -1011,7 +1011,7 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO { if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists() || !g_BaseSystem->RunDiskComboImage(_this->CurrentedSelectedRom(), FileName)) { - if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists()) { g_Notify->DisplayError(MSG_IPL_REQUIRED); } + if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists()) { g_Notify->DisplayWarning(MSG_IPL_REQUIRED); } CPath FileNameIPL; const char * Filter = "64DD IPL ROM Image (*.zip, *.7z, *.?64, *.rom, *.usa, *.jap, *.pal, *.bin)\0*.?64;*.zip;*.7z;*.bin;*.rom;*.usa;*.jap;*.pal\0All files (*.*)\0*.*\0"; if (FileNameIPL.SelectFile(hWnd, g_Settings->LoadStringVal(RomList_GameDir).c_str(), Filter, true)) @@ -1179,7 +1179,7 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO // Open Disk if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists() || !g_BaseSystem->RunDiskImage(filename)) { - if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists()) { g_Notify->DisplayError(MSG_IPL_REQUIRED); } + if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists()) { g_Notify->DisplayWarning(MSG_IPL_REQUIRED); } CPath FileName; const char * Filter = "64DD IPL ROM Image (*.zip, *.7z, *.?64, *.rom, *.usa, *.jap, *.pal, *.bin)\0*.?64;*.zip;*.7z;*.bin;*.rom;*.usa;*.jap;*.pal\0All files (*.*)\0*.*\0"; if (FileName.SelectFile(hWnd, g_Settings->LoadStringVal(RomList_GameDir).c_str(), Filter, true)) diff --git a/Source/Project64/UserInterface/Notification.cpp b/Source/Project64/UserInterface/Notification.cpp index 2ea0996c5..8a1fbca37 100644 --- a/Source/Project64/UserInterface/Notification.cpp +++ b/Source/Project64/UserInterface/Notification.cpp @@ -49,6 +49,21 @@ void CNotificationImp::WindowMode(void) const InsideFunc = false; } +void CNotificationImp::DisplayWarning(const char * Message) const +{ + HWND Parent = NULL; + if (m_hWnd) + { + Parent = reinterpret_cast(m_hWnd->GetWindowHandle()); + } + MessageBoxW(Parent, stdstr(Message).ToUTF16().c_str(), wGS(MSG_MSGBOX_WARNING_TITLE).c_str(), MB_OK | MB_ICONWARNING | MB_SETFOREGROUND); +} + +void CNotificationImp::DisplayWarning(LanguageStringID StringID) const +{ + DisplayWarning(g_Lang->GetString(StringID).c_str()); +} + void CNotificationImp::DisplayError(LanguageStringID StringID) const { DisplayError(g_Lang->GetString(StringID).c_str()); @@ -64,7 +79,7 @@ void CNotificationImp::DisplayError(const char * Message) const { Parent = reinterpret_cast(m_hWnd->GetWindowHandle()); } - MessageBoxW(Parent, stdstr(Message).ToUTF16().c_str(), wGS(MSG_MSGBOX_TITLE).c_str(), MB_OK | MB_ICONERROR | MB_SETFOREGROUND); + MessageBoxW(Parent, stdstr(Message).ToUTF16().c_str(), wGS(MSG_MSGBOX_ERROR_TITLE).c_str(), MB_OK | MB_ICONERROR | MB_SETFOREGROUND); } void CNotificationImp::DisplayMessage(int DisplayTime, LanguageStringID StringID) const @@ -125,7 +140,7 @@ bool CNotificationImp::AskYesNoQuestion(const char * Question) const { Parent = reinterpret_cast(m_hWnd->GetWindowHandle()); } - int result = MessageBoxW(Parent, stdstr(Question).ToUTF16().c_str(), wGS(MSG_MSGBOX_TITLE).c_str(), MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2 | MB_SETFOREGROUND); + int result = MessageBoxW(Parent, stdstr(Question).ToUTF16().c_str(), wGS(MSG_MSGBOX_WARNING_TITLE).c_str(), MB_YESNO | MB_ICONWARNING | MB_DEFBUTTON2 | MB_SETFOREGROUND); return result == IDYES; } diff --git a/Source/Project64/UserInterface/Notification.h b/Source/Project64/UserInterface/Notification.h index a48f65cdc..02fcb66d6 100644 --- a/Source/Project64/UserInterface/Notification.h +++ b/Source/Project64/UserInterface/Notification.h @@ -35,6 +35,9 @@ public: virtual void FatalError(LanguageStringID StringID) const; //User Feedback + virtual void DisplayWarning(const char * Message) const; + virtual void DisplayWarning(LanguageStringID StringID) const; + virtual void DisplayMessage(int DisplayTime, const char * Message) const; virtual void DisplayMessage(int DisplayTime, LanguageStringID StringID) const; diff --git a/Source/Project64/UserInterface/RomBrowserClass.cpp b/Source/Project64/UserInterface/RomBrowserClass.cpp index e6281fcb9..0bfd6713e 100644 --- a/Source/Project64/UserInterface/RomBrowserClass.cpp +++ b/Source/Project64/UserInterface/RomBrowserClass.cpp @@ -813,7 +813,7 @@ void CRomBrowser::RomList_OpenRom(uint32_t /*pnmh*/) { if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists() || !g_BaseSystem->RunDiskImage(pRomInfo->szFullFileName)) { - if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists()) { g_Notify->DisplayError(MSG_IPL_REQUIRED); } + if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists()) { g_Notify->DisplayWarning(MSG_IPL_REQUIRED); } CPath FileName; const char * Filter = "64DD IPL ROM Image (*.zip, *.7z, *.?64, *.rom, *.usa, *.jap, *.pal, *.bin)\0*.?64;*.zip;*.7z;*.bin;*.rom;*.usa;*.jap;*.pal\0All files (*.*)\0*.*\0"; if (FileName.SelectFile(m_MainWindow, g_Settings->LoadStringVal(RomList_GameDir).c_str(), Filter, true)) diff --git a/Source/Project64/UserInterface/Settings/SettingsPage-Game-Plugin.cpp b/Source/Project64/UserInterface/Settings/SettingsPage-Game-Plugin.cpp index 64f3c5d27..df31d4754 100644 --- a/Source/Project64/UserInterface/Settings/SettingsPage-Game-Plugin.cpp +++ b/Source/Project64/UserInterface/Settings/SettingsPage-Game-Plugin.cpp @@ -312,8 +312,7 @@ void CGamePluginPage::HleGfxChanged(UINT /*Code*/, int id, HWND /*ctl*/) } if ((Button->GetCheck() & BST_CHECKED) == 0) { - int res = MessageBoxW(m_hWnd, wGS(MSG_SET_LLE_GFX_MSG).c_str(), wGS(MSG_SET_LLE_GFX_TITLE).c_str(), MB_YESNO | MB_ICONWARNING); - if (res != IDYES) + if (!g_Notify->AskYesNoQuestion(g_Lang->GetString(MSG_SET_LLE_GFX_MSG).c_str())) { Button->SetCheck(BST_CHECKED); return; @@ -335,9 +334,8 @@ void CGamePluginPage::HleAudioChanged(UINT /*Code*/, int id, HWND /*ctl*/) continue; } if ((Button->GetCheck() & BST_CHECKED) != 0) - { - int res = MessageBoxW(m_hWnd, wGS(MSG_SET_HLE_AUD_MSG).c_str(), wGS(MSG_SET_HLE_AUD_TITLE).c_str(), MB_ICONWARNING | MB_YESNO); - if (res != IDYES) + { + if (!g_Notify->AskYesNoQuestion(g_Lang->GetString(MSG_SET_HLE_AUD_MSG).c_str())) { Button->SetCheck(BST_UNCHECKED); return; diff --git a/Source/Project64/UserInterface/Settings/SettingsPage-KeyboardShortcuts.cpp b/Source/Project64/UserInterface/Settings/SettingsPage-KeyboardShortcuts.cpp index 23f591203..aa15acd2f 100644 --- a/Source/Project64/UserInterface/Settings/SettingsPage-KeyboardShortcuts.cpp +++ b/Source/Project64/UserInterface/Settings/SettingsPage-KeyboardShortcuts.cpp @@ -137,13 +137,13 @@ void COptionsShortCutsPage::OnRemoveClicked(UINT /*Code*/, int /*id*/, HWND /*ct HTREEITEM hSelectedItem = m_MenuItems.GetSelectedItem(); if (hSelectedItem == NULL) { - g_Notify->DisplayError(GS(MSG_NO_SEL_SHORTCUT)); + g_Notify->DisplayWarning(GS(MSG_NO_SEL_SHORTCUT)); return; } HTREEITEM hParent = m_MenuItems.GetParentItem(hSelectedItem); if (hParent == NULL) { - g_Notify->DisplayError(GS(MSG_NO_SEL_SHORTCUT)); + g_Notify->DisplayWarning(GS(MSG_NO_SEL_SHORTCUT)); return; } @@ -153,7 +153,7 @@ void COptionsShortCutsPage::OnRemoveClicked(UINT /*Code*/, int /*id*/, HWND /*ct int index = m_CurrentKeys.GetCurSel(); if (index < 0) { - g_Notify->DisplayError(GS(MSG_NO_SEL_SHORTCUT)); + g_Notify->DisplayWarning(GS(MSG_NO_SEL_SHORTCUT)); return; } ShortCut->RemoveItem((CMenuShortCutKey *)m_CurrentKeys.GetItemData(index)); @@ -176,7 +176,7 @@ void COptionsShortCutsPage::OnAssignClicked(UINT /*Code*/, int /*id*/, HWND /*ct int index = m_VirtualKeyList.GetCurSel(); if (index < 0) { - g_Notify->DisplayError(GS(MSG_NO_SHORTCUT_SEL)); + g_Notify->DisplayWarning(GS(MSG_NO_SHORTCUT_SEL)); return; } @@ -190,13 +190,13 @@ void COptionsShortCutsPage::OnAssignClicked(UINT /*Code*/, int /*id*/, HWND /*ct HTREEITEM hSelectedItem = m_MenuItems.GetSelectedItem(); if (hSelectedItem == NULL) { - g_Notify->DisplayError(GS(MSG_NO_MENUITEM_SEL)); + g_Notify->DisplayWarning(GS(MSG_NO_MENUITEM_SEL)); return; } HTREEITEM hParent = m_MenuItems.GetParentItem(hSelectedItem); if (hParent == NULL) { - g_Notify->DisplayError(GS(MSG_NO_MENUITEM_SEL)); + g_Notify->DisplayWarning(GS(MSG_NO_MENUITEM_SEL)); return; } @@ -204,7 +204,7 @@ void COptionsShortCutsPage::OnAssignClicked(UINT /*Code*/, int /*id*/, HWND /*ct LanguageStringID strid = m_ShortCuts.GetMenuItemName(key, bCtrl, bAlt, bShift, RunningState); if (strid != EMPTY_STRING) { - g_Notify->DisplayError(GS(MSG_MENUITEM_ASSIGNED)); + g_Notify->DisplayWarning(GS(MSG_MENUITEM_ASSIGNED)); return; } diff --git a/Source/Project64/UserInterface/Settings/SettingsPage-Plugin.cpp b/Source/Project64/UserInterface/Settings/SettingsPage-Plugin.cpp index c6697dd52..84f6f047c 100644 --- a/Source/Project64/UserInterface/Settings/SettingsPage-Plugin.cpp +++ b/Source/Project64/UserInterface/Settings/SettingsPage-Plugin.cpp @@ -296,8 +296,7 @@ void COptionPluginPage::HleGfxChanged(UINT /*Code*/, int id, HWND /*ctl*/) } if ((Button->GetCheck() & BST_CHECKED) == 0) { - int res = MessageBoxW(m_hWnd, wGS(MSG_SET_LLE_GFX_MSG).c_str(), wGS(MSG_SET_LLE_GFX_TITLE).c_str(), MB_YESNO | MB_ICONWARNING); - if (res != IDYES) + if (!g_Notify->AskYesNoQuestion(g_Lang->GetString(MSG_SET_LLE_GFX_MSG).c_str())) { Button->SetCheck(BST_CHECKED); return; @@ -320,8 +319,7 @@ void COptionPluginPage::HleAudioChanged(UINT /*Code*/, int id, HWND /*ctl*/) } if ((Button->GetCheck() & BST_CHECKED) != 0) { - int res = MessageBoxW(m_hWnd, wGS(MSG_SET_HLE_AUD_MSG).c_str(), wGS(MSG_SET_HLE_AUD_TITLE).c_str(), MB_ICONWARNING | MB_YESNO); - if (res != IDYES) + if (!g_Notify->AskYesNoQuestion(g_Lang->GetString(MSG_SET_HLE_AUD_MSG).c_str())) { Button->SetCheck(BST_UNCHECKED); return; diff --git a/Source/Project64/main.cpp b/Source/Project64/main.cpp index e3b160b93..51bd98369 100644 --- a/Source/Project64/main.cpp +++ b/Source/Project64/main.cpp @@ -39,7 +39,7 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR / //Ext is *.ndd, so it should be a disk file. if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists() || !g_BaseSystem->RunDiskImage(g_Settings->LoadStringVal(Cmd_RomFile).c_str())) { - if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists()) { g_Notify->DisplayError(MSG_IPL_REQUIRED); } + if (!CPath(g_Settings->LoadStringVal(File_DiskIPLPath)).Exists()) { g_Notify->DisplayWarning(MSG_IPL_REQUIRED); } CPath FileNameIPL; const char * Filter = "64DD IPL ROM Image (*.zip, *.7z, *.?64, *.rom, *.usa, *.jap, *.pal, *.bin)\0*.?64;*.zip;*.7z;*.bin;*.rom;*.usa;*.jap;*.pal\0All files (*.*)\0*.*\0"; if (FileNameIPL.SelectFile(NULL, g_Settings->LoadStringVal(RomList_GameDir).c_str(), Filter, true))