diff --git a/Source/3rdParty/WTL/atlctrls.h b/Source/3rdParty/WTL/atlctrls.h index cfa5e7f18..dca3df58c 100644 --- a/Source/3rdParty/WTL/atlctrls.h +++ b/Source/3rdParty/WTL/atlctrls.h @@ -656,8 +656,9 @@ public: // Settable only attributes void SetColumnWidth(int cxWidth) { + float DPIScale = CClientDC(m_hWnd).GetDeviceCaps(LOGPIXELSX) / 96.0f; ATLASSERT(::IsWindow(m_hWnd)); - ::SendMessage(m_hWnd, LB_SETCOLUMNWIDTH, cxWidth, 0L); + ::SendMessage(m_hWnd, LB_SETCOLUMNWIDTH, int (cxWidth * DPIScale), 0L); } BOOL SetTabStops(int nTabStops, LPINT rgTabStops) @@ -3068,8 +3069,9 @@ public: BOOL SetColumnWidth(int nCol, int cx) { + float DPIScale = CClientDC(m_hWnd).GetDeviceCaps(LOGPIXELSX) / 96.0f; ATLASSERT(::IsWindow(m_hWnd)); - return (BOOL)::SendMessage(m_hWnd, LVM_SETCOLUMNWIDTH, nCol, MAKELPARAM(cx, 0)); + return (BOOL)::SendMessage(m_hWnd, LVM_SETCOLUMNWIDTH, nCol, MAKELPARAM(int(cx * DPIScale), 0)); } BOOL GetViewRect(LPRECT lpRect) const 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/Multilanguage/LanguageSelector.cpp b/Source/Project64/Multilanguage/LanguageSelector.cpp index af1d36d98..d0cb97b2d 100644 --- a/Source/Project64/Multilanguage/LanguageSelector.cpp +++ b/Source/Project64/Multilanguage/LanguageSelector.cpp @@ -52,8 +52,11 @@ LRESULT CALLBACK CLanguageSelector::LangSelectProc(HWND hDlg, UINT uMsg, WPARAM SendMessage(GetDlgItem(hDlg, IDC_LANG_SEL), CB_SETCURSEL, 0, 0); } + //Get Windows DPI Scale + float DPIScale = CClientDC(hDlg).GetDeviceCaps(LOGPIXELSX) / 96.0f; + // Use the size of the image - hbmpBackgroundTop = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_ABOUT_LOGO)); + hbmpBackgroundTop = LoadBitmap(GetModuleHandle(NULL), DPIScale <= 1.0f ? MAKEINTRESOURCE(IDB_ABOUT_LOGO) : MAKEINTRESOURCE(IDB_ABOUT_LOGO_HDPI)); BITMAP bmTL; GetObject(hbmpBackgroundTop, sizeof(BITMAP), &bmTL); @@ -99,7 +102,8 @@ LRESULT CALLBACK CLanguageSelector::LangSelectProc(HWND hDlg, UINT uMsg, WPARAM HDC memdc = CreateCompatibleDC(ps.hdc); HGDIOBJ save = SelectObject(memdc, hbmpBackgroundTop); - BitBlt(ps.hdc, 0, 0, bmTL_top.bmWidth, bmTL_top.bmHeight, memdc, 0, 0, SRCCOPY); + SetStretchBltMode(ps.hdc, HALFTONE); + StretchBlt(ps.hdc, 0, 0, rcClient.right, (int)(bmTL_top.bmHeight * rcClient.right / bmTL_top.bmWidth), memdc, 0, 0, bmTL_top.bmWidth, bmTL_top.bmHeight, SRCCOPY); SelectObject(memdc, save); DeleteDC(memdc); diff --git a/Source/Project64/Project64.exe.manifest b/Source/Project64/Project64.exe.manifest new file mode 100644 index 000000000..275e30b0a --- /dev/null +++ b/Source/Project64/Project64.exe.manifest @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + true + + permonitorv2,permonitor + + + + \ No newline at end of file diff --git a/Source/Project64/Project64.vcxproj b/Source/Project64/Project64.vcxproj index 880497dbf..7ba01bbe8 100644 --- a/Source/Project64/Project64.vcxproj +++ b/Source/Project64/Project64.vcxproj @@ -32,7 +32,7 @@ - true + false @@ -247,6 +247,9 @@ + + + diff --git a/Source/Project64/Project64.vcxproj.filters b/Source/Project64/Project64.vcxproj.filters index a415c7c12..8d220cd82 100644 --- a/Source/Project64/Project64.vcxproj.filters +++ b/Source/Project64/Project64.vcxproj.filters @@ -499,4 +499,7 @@ Resource Files + + + \ No newline at end of file diff --git a/Source/Project64/Settings/UISettings.cpp b/Source/Project64/Settings/UISettings.cpp index 68c6e7eb4..c7ffeb106 100644 --- a/Source/Project64/Settings/UISettings.cpp +++ b/Source/Project64/Settings/UISettings.cpp @@ -48,8 +48,8 @@ void RegisterUISettings (void) g_Settings->AddHandler((SettingID)(FirstUISettings + RomBrowser_ColoumnsChanged), new CSettingTypeTempBool(false)); g_Settings->AddHandler((SettingID)(FirstUISettings + RomBrowser_Top), new CSettingTypeApplication("Rom Browser", "Top", Default_None)); g_Settings->AddHandler((SettingID)(FirstUISettings + RomBrowser_Left), new CSettingTypeApplication("Rom Browser", "Left", Default_None)); - g_Settings->AddHandler((SettingID)(FirstUISettings + RomBrowser_Width), new CSettingTypeApplication("Rom Browser", "Width", (uint32_t)640)); - g_Settings->AddHandler((SettingID)(FirstUISettings + RomBrowser_Height), new CSettingTypeApplication("Rom Browser", "Height", (uint32_t)480)); + g_Settings->AddHandler((SettingID)(FirstUISettings + RomBrowser_Width), new CSettingTypeApplication("Rom Browser", "Width", (uint32_t)(640 * DPIScale()))); + g_Settings->AddHandler((SettingID)(FirstUISettings + RomBrowser_Height), new CSettingTypeApplication("Rom Browser", "Height", (uint32_t)(480 * DPIScale()))); g_Settings->AddHandler((SettingID)(FirstUISettings + RomBrowser_PosIndex), new CSettingTypeApplicationIndex("Rom Browser\\Field Pos", "Field", Default_None)); g_Settings->AddHandler((SettingID)(FirstUISettings + RomBrowser_WidthIndex), new CSettingTypeApplicationIndex("Rom Browser\\Field Width", "Field", Default_None)); g_Settings->AddHandler((SettingID)(FirstUISettings + RomBrowser_SortFieldIndex), new CSettingTypeApplicationIndex("Rom Browser", "Sort Field", Default_None)); @@ -80,6 +80,10 @@ void RegisterUISettings (void) g_Settings->AddHandler((SettingID)(FirstUISettings + DebuggerUI_ExceptionBPPos), new CSettingTypeApplication("Debugger UI", "Exception BP Pos", Default_None)); } +float DPIScale(void) { + return CClientDC(0).GetDeviceCaps(LOGPIXELSX) / 96.0f; +} + void UISettingsSaveBool(UISettingID Type, bool Value) { g_Settings->SaveBool((SettingID)(FirstUISettings + Type), Value); diff --git a/Source/Project64/Settings/UISettings.h b/Source/Project64/Settings/UISettings.h index 304757206..45d3c4d97 100644 --- a/Source/Project64/Settings/UISettings.h +++ b/Source/Project64/Settings/UISettings.h @@ -77,6 +77,7 @@ enum UISettingID DebuggerUI_ExceptionBPPos }; +float DPIScale(void); void RegisterUISettings (void); void UISettingsSaveBool(UISettingID Type, bool Value); void UISettingsSaveBoolIndex(UISettingID Type, int32_t index, bool Value); diff --git a/Source/Project64/UserInterface/Bitmaps/AboutScreenLogoHDPI.bmp b/Source/Project64/UserInterface/Bitmaps/AboutScreenLogoHDPI.bmp new file mode 100644 index 000000000..c0b0dd331 Binary files /dev/null and b/Source/Project64/UserInterface/Bitmaps/AboutScreenLogoHDPI.bmp differ diff --git a/Source/Project64/UserInterface/CheatClassUI.cpp b/Source/Project64/UserInterface/CheatClassUI.cpp index fc5cb35a7..269146d48 100644 --- a/Source/Project64/UserInterface/CheatClassUI.cpp +++ b/Source/Project64/UserInterface/CheatClassUI.cpp @@ -188,7 +188,6 @@ int CALLBACK CCheatsUI::CheatAddProc(HWND hDlg, uint32_t uMsg, uint32_t wParam, CCheatsUI * _this = (CCheatsUI *)lParam; SetProp(hDlg, "Class", _this); - SetWindowTextW(hDlg, wGS(CHEAT_ADDCHEAT_FRAME).c_str()); SetWindowTextW(GetDlgItem(hDlg, IDC_NAME), wGS(CHEAT_ADDCHEAT_NAME).c_str()); SetWindowTextW(GetDlgItem(hDlg, IDC_CODE), wGS(CHEAT_ADDCHEAT_CODE).c_str()); SetWindowTextW(GetDlgItem(hDlg, IDC_LABEL_OPTIONS), wGS(CHEAT_ADDCHEAT_OPT).c_str()); @@ -301,7 +300,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; } @@ -452,18 +451,17 @@ int CALLBACK CCheatsUI::CheatListProc(HWND hDlg, uint32_t uMsg, uint32_t wParam, RECT rcList; RECT rcButton; - SetWindowTextW(GetDlgItem(hDlg, IDC_CHEATSFRAME), wGS(CHEAT_LIST_FRAME).c_str()); SetWindowTextW(GetDlgItem(hDlg, IDC_NOTESFRAME), wGS(CHEAT_NOTES_FRAME).c_str()); SetWindowTextW(GetDlgItem(hDlg, IDC_UNMARK), wGS(CHEAT_MARK_NONE).c_str()); - GetWindowRect(GetDlgItem(hDlg, IDC_CHEATSFRAME), &rcList); + GetWindowRect(hDlg, &rcList); GetWindowRect(GetDlgItem(hDlg, IDC_UNMARK), &rcButton); _this->m_hCheatTree = CreateWindowEx(WS_EX_CLIENTEDGE, WC_TREEVIEW, "", WS_CHILD | WS_VISIBLE | WS_VSCROLL | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | WS_TABSTOP | - TVS_FULLROWSELECT, 8, 15, rcList.right - rcList.left - 16, - rcButton.top - rcList.top - 22, hDlg, (HMENU)IDC_MYTREE, GetModuleHandle(NULL), NULL); + TVS_FULLROWSELECT, 6, 4, rcList.right - rcList.left - 13, + rcButton.top - rcList.top - 8, hDlg, (HMENU)IDC_MYTREE, GetModuleHandle(NULL), NULL); Style = GetWindowLong(_this->m_hCheatTree, GWL_STYLE); SetWindowLong(_this->m_hCheatTree, GWL_STYLE, TVS_CHECKBOXES | TVS_SHOWSELALWAYS | Style); @@ -944,7 +942,7 @@ int CALLBACK CCheatsUI::ManageCheatsProc(HWND hDlg, uint32_t uMsg, uint32_t wPar if (g_Settings->LoadDword(UserInterface_BasicMode)) { RECT * rcList = (RECT *)_this->m_rcList; - GetWindowRect(GetDlgItem(_this->m_hSelectCheat, IDC_CHEATSFRAME), rcList); + GetWindowRect(_this->m_hSelectCheat, rcList); _this->m_MinSizeDlg = rcList->right - rcList->left + 16; _this->m_MaxSizeDlg = _this->m_MinSizeDlg; @@ -961,8 +959,8 @@ int CALLBACK CCheatsUI::ManageCheatsProc(HWND hDlg, uint32_t uMsg, uint32_t wPar ShowWindow(_this->m_AddCheat, SW_HIDE); RECT * rcAdd = (RECT *)_this->m_rcAdd, *rcList = (RECT *)_this->m_rcList; - GetWindowRect(GetDlgItem(_this->m_hSelectCheat, IDC_CHEATSFRAME), rcList); - GetWindowRect(GetDlgItem(_this->m_AddCheat, IDC_ADDCHEATSFRAME), rcAdd); + GetWindowRect(_this->m_hSelectCheat, rcList); + GetWindowRect(_this->m_AddCheat, rcAdd); _this->m_MinSizeDlg = rcList->right - rcList->left + 32; _this->m_MaxSizeDlg = rcAdd->right - rcList->left + 32; diff --git a/Source/Project64/UserInterface/Debugger/DebugDialog.h b/Source/Project64/UserInterface/Debugger/DebugDialog.h index 5e3e327b0..69067e33d 100644 --- a/Source/Project64/UserInterface/Debugger/DebugDialog.h +++ b/Source/Project64/UserInterface/Debugger/DebugDialog.h @@ -47,18 +47,28 @@ protected: pT->SetWindowPos(NULL, left, top, width, height, 0); pT->RedrawWindow(); } + if (nParams == 2) { + pT->SetWindowPos(NULL, left, top, width, height, 1); + pT->RedrawWindow(); + } } - void SaveWindowPos() + void SaveWindowPos(bool bSaveSize) { if (!m_bInitialized) { return; } + T* pT = static_cast(this); CRect rect; pT->GetWindowRect(&rect); - UISettingsSaveString(m_UISettingID, stdstr_f("%d,%d,%d,%d", rect.left, rect.top, rect.Width(), rect.Height()).c_str()); + if (!bSaveSize) { + UISettingsSaveString(m_UISettingID, stdstr_f("%d,%d", rect.left, rect.top).c_str()); + } + else { + UISettingsSaveString(m_UISettingID, stdstr_f("%d,%d,%d,%d", rect.left, rect.top, rect.Width(), rect.Height()).c_str()); + } } public: @@ -122,4 +132,4 @@ private: bool m_SaveWnd; LONG m_SaveWndTop; LONG m_SaveWndLeft; -}; +}; \ No newline at end of file diff --git a/Source/Project64/UserInterface/Debugger/Debugger-CPULogView.cpp b/Source/Project64/UserInterface/Debugger/Debugger-CPULogView.cpp index 0d68c149c..87a5c4e19 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-CPULogView.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-CPULogView.cpp @@ -243,7 +243,7 @@ void CDebugCPULogView::InterceptMouseWheel(WPARAM wParam, LPARAM /*lParam*/) void CDebugCPULogView::OnExitSizeMove(void) { RefreshList(false); - SaveWindowPos(); + SaveWindowPos(true); } void CDebugCPULogView::ToggleLoggingEnabled(void) diff --git a/Source/Project64/UserInterface/Debugger/Debugger-Commands.cpp b/Source/Project64/UserInterface/Debugger/Debugger-Commands.cpp index 33db63dcc..f1795b108 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-Commands.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-Commands.cpp @@ -30,16 +30,16 @@ void CCommandList::Attach(HWND hWndNew) SetColumnWidth(COL_ARROWS, 30); AddColumn("Address", COL_ADDRESS); - SetColumnWidth(COL_ADDRESS, 65); + SetColumnWidth(COL_ADDRESS, 70); AddColumn("Command", COL_COMMAND); - SetColumnWidth(COL_COMMAND, 60); + SetColumnWidth(COL_COMMAND, 65); AddColumn("Parameters", COL_PARAMETERS); - SetColumnWidth(COL_PARAMETERS, 120); + SetColumnWidth(COL_PARAMETERS, 130); AddColumn("Symbol", COL_SYMBOL); - SetColumnWidth(COL_SYMBOL, 140); + SetColumnWidth(COL_SYMBOL, 180); } CDebugCommandsView* CDebugCommandsView::_this = NULL; @@ -150,7 +150,7 @@ LRESULT CDebugCommandsView::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARA void CDebugCommandsView::OnExitSizeMove(void) { - SaveWindowPos(); + SaveWindowPos(true); } LRESULT CDebugCommandsView::OnDestroy(void) diff --git a/Source/Project64/UserInterface/Debugger/Debugger-DMALogView.cpp b/Source/Project64/UserInterface/Debugger/Debugger-DMALogView.cpp index 7ad287e5c..1c8231277 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-DMALogView.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-DMALogView.cpp @@ -206,7 +206,7 @@ LRESULT CDebugDMALogView::OnRefresh(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lPara void CDebugDMALogView::OnExitSizeMove(void) { - SaveWindowPos(); + SaveWindowPos(true); } LRESULT CDebugDMALogView::OnDestroy(void) diff --git a/Source/Project64/UserInterface/Debugger/Debugger-ExceptionBreakpoints.cpp b/Source/Project64/UserInterface/Debugger/Debugger-ExceptionBreakpoints.cpp index 4ec0c39e6..e396294ac 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-ExceptionBreakpoints.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-ExceptionBreakpoints.cpp @@ -96,5 +96,5 @@ LRESULT CDebugExcBreakpoints::OnClicked(WORD /*wNotifyCode*/, WORD wID, HWND, BO void CDebugExcBreakpoints::OnExitSizeMove(void) { - SaveWindowPos(); + SaveWindowPos(0); } diff --git a/Source/Project64/UserInterface/Debugger/Debugger-MemoryDump.cpp b/Source/Project64/UserInterface/Debugger/Debugger-MemoryDump.cpp index 2d2aec9a3..4153bf430 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-MemoryDump.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-MemoryDump.cpp @@ -59,7 +59,7 @@ LRESULT CDumpMemory::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lPa void CDumpMemory::OnExitSizeMove(void) { - SaveWindowPos(); + SaveWindowPos(0); } LRESULT CDumpMemory::OnClicked(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/) @@ -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/Debugger/Debugger-MemorySearch.cpp b/Source/Project64/UserInterface/Debugger/Debugger-MemorySearch.cpp index fc35096c1..a4c3a5e9e 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-MemorySearch.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-MemorySearch.cpp @@ -216,7 +216,7 @@ LRESULT CALLBACK CDebugMemorySearch::HookProc(int nCode, WPARAM wParam, LPARAM l void CDebugMemorySearch::OnExitSizeMove(void) { UpdateWatchList(true); - SaveWindowPos(); + SaveWindowPos(true); } void CDebugMemorySearch::OnSizing(UINT /*fwSide*/, LPRECT /*pRect*/) diff --git a/Source/Project64/UserInterface/Debugger/Debugger-Scripts.cpp b/Source/Project64/UserInterface/Debugger/Debugger-Scripts.cpp index cf2ee6189..815f8166a 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-Scripts.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-Scripts.cpp @@ -64,7 +64,7 @@ LRESULT CDebugScripts::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*l void CDebugScripts::OnExitSizeMove(void) { - SaveWindowPos(); + SaveWindowPos(true); } void CDebugScripts::ConsolePrint(const char* text) diff --git a/Source/Project64/UserInterface/Debugger/Debugger-StackTrace.cpp b/Source/Project64/UserInterface/Debugger/Debugger-StackTrace.cpp index 51352e3e4..9d7108242 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-StackTrace.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-StackTrace.cpp @@ -70,7 +70,7 @@ LRESULT CDebugStackTrace::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM void CDebugStackTrace::OnExitSizeMove(void) { - SaveWindowPos(); + SaveWindowPos(true); } LRESULT CDebugStackTrace::OnActivate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) diff --git a/Source/Project64/UserInterface/Debugger/Debugger-StackView.cpp b/Source/Project64/UserInterface/Debugger/Debugger-StackView.cpp index a4cc480cd..8962b5858 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-StackView.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-StackView.cpp @@ -51,7 +51,7 @@ LRESULT CDebugStackView::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM / void CDebugStackView::OnExitSizeMove(void) { - SaveWindowPos(); + SaveWindowPos(true); } LRESULT CDebugStackView::OnDestroy(void) diff --git a/Source/Project64/UserInterface/Debugger/Debugger-Symbols.cpp b/Source/Project64/UserInterface/Debugger/Debugger-Symbols.cpp index 043718198..7cc5be1cf 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-Symbols.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-Symbols.cpp @@ -53,7 +53,7 @@ LRESULT CDebugSymbols::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*l void CDebugSymbols::OnExitSizeMove(void) { - SaveWindowPos(); + SaveWindowPos(true); } LRESULT CDebugSymbols::OnDestroy(void) diff --git a/Source/Project64/UserInterface/Debugger/Debugger-TLB.cpp b/Source/Project64/UserInterface/Debugger/Debugger-TLB.cpp index 63ec05317..1a089533c 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-TLB.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-TLB.cpp @@ -85,7 +85,7 @@ LRESULT CDebugTlb::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lPara void CDebugTlb::OnExitSizeMove(void) { - SaveWindowPos(); + SaveWindowPos(0); } LRESULT CDebugTlb::OnClicked(WORD /*wNotifyCode*/, WORD wID, HWND, BOOL& /*bHandled*/) diff --git a/Source/Project64/UserInterface/Debugger/Debugger-ViewMemory.cpp b/Source/Project64/UserInterface/Debugger/Debugger-ViewMemory.cpp index 186a6d8ae..4d390be55 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-ViewMemory.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-ViewMemory.cpp @@ -152,7 +152,7 @@ DWORD WINAPI CDebugMemoryView::AutoRefreshProc(void* _self) void CDebugMemoryView::OnExitSizeMove() { - SaveWindowPos(); + SaveWindowPos(0); } void CDebugMemoryView::InterceptMouseWheel(WPARAM wParam, LPARAM /*lParam*/) 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/Icons/pj64.ico b/Source/Project64/UserInterface/Icons/pj64.ico index 3fcaf4b2c..acd3a708b 100644 Binary files a/Source/Project64/UserInterface/Icons/pj64.ico and b/Source/Project64/UserInterface/Icons/pj64.ico differ diff --git a/Source/Project64/UserInterface/MainMenu.cpp b/Source/Project64/UserInterface/MainMenu.cpp index bcb439e30..1a13ec2ce 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)) @@ -1152,7 +1152,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu) /* Debug - Exception breakpoints *******************/ - Item.Reset(ID_DEBUGGER_EXCBREAKPOINTS, EMPTY_STRING, EMPTY_STDSTR, NULL, L"CPU Exception breakpoints..."); + Item.Reset(ID_DEBUGGER_EXCBREAKPOINTS, EMPTY_STRING, EMPTY_STDSTR, NULL, L"CPU Exception Breakpoints..."); //Item.SetItemEnabled(CPURunning); DebugMenu.push_back(Item); diff --git a/Source/Project64/UserInterface/MainWindow.cpp b/Source/Project64/UserInterface/MainWindow.cpp index 6bdd600e5..99ca83989 100644 --- a/Source/Project64/UserInterface/MainWindow.cpp +++ b/Source/Project64/UserInterface/MainWindow.cpp @@ -526,7 +526,7 @@ void CMainGui::Resize(DWORD /*fwSizeType*/, WORD nWidth, WORD nHeight) GetClientRect((HWND)m_hStatusWnd, &swrect); int Parts[2]; - Parts[0] = (nWidth - (int)(clrect.right * 0.25)); + Parts[0] = (int) (nWidth - 140 * DPIScale(m_hStatusWnd)); Parts[1] = nWidth; SendMessage((HWND)m_hStatusWnd, SB_SETPARTS, 2, (LPARAM)&Parts[0]); @@ -573,6 +573,10 @@ int CMainGui::Width(void) return rect.right - rect.left; } +float CMainGui::DPIScale(HWND hWnd) { + return CClientDC(hWnd).GetDeviceCaps(LOGPIXELSX) / 96.0f; +} + void CMainGui::SetPos(int X, int Y) { SetWindowPos(m_hMainWindow, NULL, X, Y, 0, 0, SWP_NOZORDER | SWP_NOSIZE); @@ -678,7 +682,7 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO _this->SetPos(X, Y); - _this->ChangeWinSize(640, 480); + _this->ChangeWinSize(int (640 * _this->DPIScale(hWnd)), int (480 * _this->DPIScale(hWnd))); } break; case WM_SYSCOMMAND: @@ -991,7 +995,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 +1015,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 +1183,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)) @@ -1222,6 +1226,7 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO DWORD CALLBACK AboutBoxProc(HWND hWnd, DWORD uMsg, DWORD wParam, DWORD /*lParam*/) { + CMainGui * Gui = NULL; static HBITMAP hbmpBackgroundTop = NULL; static HFONT hPageHeadingFont = NULL; static HFONT hTextFont = NULL; @@ -1233,16 +1238,18 @@ DWORD CALLBACK AboutBoxProc(HWND hWnd, DWORD uMsg, DWORD wParam, DWORD /*lParam* //Title SetWindowTextW(hWnd, wGS(PLUG_ABOUT).c_str()); - // Use the size of the image - hbmpBackgroundTop = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_ABOUT_LOGO)); + // Get Windows DPI Scale + float DPIScale = Gui->DPIScale(hWnd); + // Use the size of the image + hbmpBackgroundTop = LoadBitmap(GetModuleHandle(NULL), DPIScale <= 1.0f ? MAKEINTRESOURCE(IDB_ABOUT_LOGO) : MAKEINTRESOURCE(IDB_ABOUT_LOGO_HDPI)); BITMAP bmTL; GetObject(hbmpBackgroundTop, sizeof(BITMAP), &bmTL); - hTextFont = ::CreateFont(18, 0, 0, 0, FW_NORMAL, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial"); - hAuthorFont = ::CreateFont(18, 0, 0, 0, FW_BOLD, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial"); + hTextFont = ::CreateFont((int)(18 * DPIScale), 0, 0, 0, FW_NORMAL, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial"); + hAuthorFont = ::CreateFont((int)(18 * DPIScale), 0, 0, 0, FW_BOLD, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial"); - hPageHeadingFont = ::CreateFont(24, 0, 0, 0, FW_BOLD, 0, FALSE, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial Bold"); + hPageHeadingFont = ::CreateFont((int)(24 * DPIScale), 0, 0, 0, FW_BOLD, 0, FALSE, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial Bold"); SendDlgItemMessage(hWnd, IDC_VERSION, WM_SETFONT, (WPARAM)hTextFont, TRUE); SendDlgItemMessage(hWnd, IDC_TEAM, WM_SETFONT, (WPARAM)hPageHeadingFont, TRUE); @@ -1302,7 +1309,8 @@ DWORD CALLBACK AboutBoxProc(HWND hWnd, DWORD uMsg, DWORD wParam, DWORD /*lParam* HDC memdc = CreateCompatibleDC(ps.hdc); HGDIOBJ save = SelectObject(memdc, hbmpBackgroundTop); - BitBlt(ps.hdc, 0, 0, bmTL_top.bmWidth, bmTL_top.bmHeight, memdc, 0, 0, SRCCOPY); + SetStretchBltMode(ps.hdc, HALFTONE); + StretchBlt(ps.hdc, 0, 0, rcClient.right, (int)(bmTL_top.bmHeight * rcClient.right/bmTL_top.bmWidth), memdc, 0, 0, bmTL_top.bmWidth, bmTL_top.bmHeight, SRCCOPY); SelectObject(memdc, save); DeleteDC(memdc); diff --git a/Source/Project64/UserInterface/MainWindow.h b/Source/Project64/UserInterface/MainWindow.h index 34b483819..32db17cbd 100644 --- a/Source/Project64/UserInterface/MainWindow.h +++ b/Source/Project64/UserInterface/MainWindow.h @@ -60,6 +60,7 @@ public: //Get Information about the window int Height(void); //Get the Height of the window int Width(void); //Get the Width of the window + float DPIScale(HWND hWnd); //Manipulate the state of the window void SetPos(int X, int Y); //Move the window to this screen location 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..d5da717c5 100644 --- a/Source/Project64/UserInterface/RomBrowserClass.cpp +++ b/Source/Project64/UserInterface/RomBrowserClass.cpp @@ -40,7 +40,7 @@ CRomBrowser::~CRomBrowser(void) void CRomBrowser::AddField(ROMBROWSER_FIELDS_LIST & Fields, LPCSTR Name, int32_t Pos, int32_t ID, int32_t Width, LanguageStringID LangID, bool UseDefault) { - Fields.push_back(ROMBROWSER_FIELDS(Name, Pos, ID, Width, LangID, UseDefault)); + Fields.push_back(ROMBROWSER_FIELDS(Name, Pos, ID, Width * DPIScale(), LangID, UseDefault)); } void CRomBrowser::GetFieldInfo(ROMBROWSER_FIELDS_LIST & Fields, bool UseDefault /* = false */) @@ -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/UserInterface/UIResources.rc b/Source/Project64/UserInterface/UIResources.rc index 61a26fd2a..5b126ace5 100644 --- a/Source/Project64/UserInterface/UIResources.rc +++ b/Source/Project64/UserInterface/UIResources.rc @@ -176,27 +176,27 @@ BEGIN DEFPUSHBUTTON "&Close",IDC_CLOSE_BUTTON,169,186,64,14 GROUPBOX "",IDC_STATIC,6,5,228,177 LTEXT "ROM Name:",IDC_ROM_NAME,11,16,64,10 - EDITTEXT IDC_INFO_ROMNAME,77,15,153,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE + EDITTEXT IDC_INFO_ROMNAME,77,15,153,13,ES_AUTOHSCROLL | ES_READONLY | WS_GROUP LTEXT "File Name:",IDC_FILE_NAME,11,31,64,10 - EDITTEXT IDC_INFO_FILENAME,77,30,153,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE + EDITTEXT IDC_INFO_FILENAME,77,30,153,13,ES_AUTOHSCROLL | ES_READONLY | WS_GROUP LTEXT "Rom Size:",IDC_ROM_SIZE,11,74,64,10 - EDITTEXT IDC_INFO_ROMSIZE,77,74,153,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE + EDITTEXT IDC_INFO_ROMSIZE,77,74,153,13,ES_AUTOHSCROLL | ES_READONLY | WS_GROUP LTEXT "Cartridge ID:",IDC_CART_ID,11,90,64,10 - EDITTEXT IDC_INFO_CARTID,77,89,153,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE + EDITTEXT IDC_INFO_CARTID,77,89,153,13,ES_AUTOHSCROLL | ES_READONLY | WS_GROUP LTEXT "Manufacturer:",IDC_MANUFACTURER,11,106,64,10 - EDITTEXT IDC_INFO_MANUFACTURER,77,104,153,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE + EDITTEXT IDC_INFO_MANUFACTURER,77,104,153,13,ES_AUTOHSCROLL | ES_READONLY | WS_GROUP LTEXT "Country:",IDC_COUNTRY,11,122,64,10 - EDITTEXT IDC_INFO_COUNTRY,77,119,153,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE + EDITTEXT IDC_INFO_COUNTRY,77,119,153,13,ES_AUTOHSCROLL | ES_READONLY | WS_GROUP LTEXT "CRC1:",IDC_CRC1,11,135,64,10 - EDITTEXT IDC_INFO_CRC1,77,134,153,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE + EDITTEXT IDC_INFO_CRC1,77,134,153,13,ES_AUTOHSCROLL | ES_READONLY | WS_GROUP LTEXT "CRC2:",IDC_CRC2,11,151,64,10 - EDITTEXT IDC_INFO_CRC2,77,149,153,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE + EDITTEXT IDC_INFO_CRC2,77,149,153,13,ES_AUTOHSCROLL | ES_READONLY | WS_GROUP LTEXT "CIC Chip:",IDC_CIC_CHIP,11,167,64,10 - EDITTEXT IDC_INFO_CIC,77,164,153,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE + EDITTEXT IDC_INFO_CIC,77,164,153,13,ES_AUTOHSCROLL | ES_READONLY | WS_GROUP LTEXT "Location:",IDC_LOCATION,11,45,64,10 - EDITTEXT IDC_INFO_LOCATION,77,45,153,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE + EDITTEXT IDC_INFO_LOCATION,77,45,153,13,ES_AUTOHSCROLL | ES_READONLY | WS_GROUP LTEXT "MD5:",IDC_ROM_MD5,11,60,64,10 - EDITTEXT IDC_INFO_MD5,77,59,153,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE + EDITTEXT IDC_INFO_MD5,77,59,153,13,ES_AUTOHSCROLL | ES_READONLY | WS_GROUP END IDD_Settings_GameGeneral DIALOGEX 0, 0, 218, 169 @@ -264,7 +264,7 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | CAPTION "Cheats" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - PUSHBUTTON "Button1",IDC_STATE,195,5,20,20,BS_ICON | BS_FLAT,WS_EX_TRANSPARENT + PUSHBUTTON "Button1",IDC_STATE,195,5,20,20,BS_LEFTTEXT | BS_ICON END IDD_Cheats_List DIALOGEX 0, 0, 201, 221 @@ -272,9 +272,8 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - GROUPBOX "Cheats",IDC_CHEATSFRAME,0,0,199,160 - PUSHBUTTON "Unmark All",IDC_UNMARK,145,145,49,11 - GROUPBOX " Notes: ",IDC_NOTESFRAME,0,165,199,51 + PUSHBUTTON "Unmark All",IDC_UNMARK,148,152,49,11 + GROUPBOX " Notes: ",IDC_NOTESFRAME,3,165,194,48 EDITTEXT IDC_NOTES,5,175,188,36,ES_MULTILINE | ES_READONLY | ES_WANTRETURN | NOT WS_BORDER | WS_VSCROLL END @@ -283,19 +282,18 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_CHILD | WS_VISIBLE EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - GROUPBOX "",IDC_ADDCHEATSFRAME,2,0,188,145 - LTEXT "Name:",IDC_NAME,7,13,25,10 - EDITTEXT IDC_CODE_NAME,37,12,146,12,ES_AUTOHSCROLL - LTEXT "Code:",IDC_CODE,7,30,25,10 - LTEXT "
",IDC_CODE_DES,7,40,60,10 - LTEXT "Options:",IDC_LABEL_OPTIONS,82,30,30,10,WS_DISABLED - LTEXT "