From 72f305c77952df22727f2a7ba325249d504531ce Mon Sep 17 00:00:00 2001 From: oltolm Date: Wed, 4 Feb 2026 20:42:14 +0100 Subject: [PATCH] fix warnings and cmake windows build --- UI/GamepadEmu.h | 2 +- Windows/Debugger/CtrlDisAsmView.cpp | 2 +- Windows/Debugger/CtrlRegisterList.cpp | 2 +- Windows/GEDebugger/CtrlDisplayListView.cpp | 2 +- Windows/GEDebugger/GEDebugger.cpp | 2 +- Windows/MainWindow.cpp | 2 +- Windows/TouchInputHandler.cpp | 2 +- Windows/W32Util/ShellUtil.h | 1 + 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/UI/GamepadEmu.h b/UI/GamepadEmu.h index 7b305082b0..d3019fe8ec 100644 --- a/UI/GamepadEmu.h +++ b/UI/GamepadEmu.h @@ -191,7 +191,7 @@ public: bool Touch(const TouchInput &input) override; void Update() override; bool IsDown() const override; // For visual purpose - bool IsDownForFadeoutCheck() const { + bool IsDownForFadeoutCheck() const override { return !(pspButtonBit_ & (1ULL << 38)); // VIRTKEY_TOGGLE_TOUCH_CONTROLS from g_customKeyList } diff --git a/Windows/Debugger/CtrlDisAsmView.cpp b/Windows/Debugger/CtrlDisAsmView.cpp index 0c4f361008..f66c00a825 100644 --- a/Windows/Debugger/CtrlDisAsmView.cpp +++ b/Windows/Debugger/CtrlDisAsmView.cpp @@ -26,7 +26,7 @@ #include -constexpr wchar_t *szClassName = L"CtrlDisAsmView"; +constexpr const wchar_t *szClassName = L"CtrlDisAsmView"; static constexpr UINT_PTR IDT_REDRAW = 0xC0DE0001; static constexpr UINT REDRAW_DELAY = 1000 / 60; diff --git a/Windows/Debugger/CtrlRegisterList.cpp b/Windows/Debugger/CtrlRegisterList.cpp index 21c69d2499..1605e09ad9 100644 --- a/Windows/Debugger/CtrlRegisterList.cpp +++ b/Windows/Debugger/CtrlRegisterList.cpp @@ -20,7 +20,7 @@ enum { REGISTER_PC = 32, REGISTER_HI, REGISTER_LO, REGISTERS_END }; -constexpr wchar_t *szClassName = L"CtrlRegisterList"; +constexpr const wchar_t *szClassName = L"CtrlRegisterList"; static constexpr UINT_PTR IDT_REDRAW = 0xC0DE0001; static constexpr UINT REDRAW_DELAY = 1000 / 60; diff --git a/Windows/GEDebugger/CtrlDisplayListView.cpp b/Windows/GEDebugger/CtrlDisplayListView.cpp index c7a59ada2e..d30ff4e3aa 100644 --- a/Windows/GEDebugger/CtrlDisplayListView.cpp +++ b/Windows/GEDebugger/CtrlDisplayListView.cpp @@ -12,7 +12,7 @@ #include "GPU/Debugger/Breakpoints.h" #include "GPU/GPUState.h" -constexpr wchar_t *szWindowClass = L"CtrlDisplayListView"; +constexpr const wchar_t *szWindowClass = L"CtrlDisplayListView"; void CtrlDisplayListView::registerClass() { diff --git a/Windows/GEDebugger/GEDebugger.cpp b/Windows/GEDebugger/GEDebugger.cpp index fe7de3734e..a9ac39a364 100644 --- a/Windows/GEDebugger/GEDebugger.cpp +++ b/Windows/GEDebugger/GEDebugger.cpp @@ -437,7 +437,7 @@ void CGEDebugger::DescribeSecondPreview(const GPUgstate &state, char desc[256]) } void CGEDebugger::PreviewExport(const GPUDebugBuffer *dbgBuffer) { - constexpr wchar_t *filter = L"PNG Image (*.png)\0*.png\0JPEG Image (*.jpg)\0*.jpg\0All files\0*.*\0\0"; + constexpr const wchar_t *filter = L"PNG Image (*.png)\0*.png\0JPEG Image (*.jpg)\0*.jpg\0All files\0*.*\0\0"; std::string fn; if (W32Util::BrowseForFileName(false, GetDlgHandle(), L"Save Preview Image...", nullptr, filter, L"png", fn)) { ScreenshotFormat fmt = fn.find(".jpg") != fn.npos ? ScreenshotFormat::JPG : ScreenshotFormat::PNG; diff --git a/Windows/MainWindow.cpp b/Windows/MainWindow.cpp index e97adce5de..0ea5deb540 100644 --- a/Windows/MainWindow.cpp +++ b/Windows/MainWindow.cpp @@ -178,7 +178,7 @@ namespace MainWindow { static bool trapMouse = true; // Handles some special cases(alt+tab, win menu) when game is running and mouse is confined - static constexpr wchar_t *szWindowClass = L"PPSSPPWnd"; + static constexpr const wchar_t *szWindowClass = L"PPSSPPWnd"; static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); diff --git a/Windows/TouchInputHandler.cpp b/Windows/TouchInputHandler.cpp index 2bedf608f2..7a8bb502f1 100644 --- a/Windows/TouchInputHandler.cpp +++ b/Windows/TouchInputHandler.cpp @@ -99,7 +99,7 @@ void TouchInputHandler::handleTouchEvent(HWND hWnd, UINT message, WPARAM wParam, // disable the press and hold gesture for the given window void TouchInputHandler::disablePressAndHold(HWND hWnd) { // The atom identifier and Tablet PC atom - wchar_t *tabletAtom = L"MicrosoftTabletPenServiceProperty"; + const wchar_t *tabletAtom = L"MicrosoftTabletPenServiceProperty"; ATOM atomID = GlobalAddAtom(tabletAtom); // If getting the ID failed, return false diff --git a/Windows/W32Util/ShellUtil.h b/Windows/W32Util/ShellUtil.h index 697148d448..818838607a 100644 --- a/Windows/W32Util/ShellUtil.h +++ b/Windows/W32Util/ShellUtil.h @@ -3,6 +3,7 @@ #include #include #include +#include class Path;