From f0f3c5502cb234e7c1df49f02fb2973402009455 Mon Sep 17 00:00:00 2001 From: OV2 Date: Mon, 8 May 2023 19:02:50 +0200 Subject: [PATCH] win32: get rid of some warnings --- win32/CDirect3D.cpp | 2 +- win32/CVulkan.cpp | 2 +- win32/wconfig.cpp | 2 +- win32/wsnes9x.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/win32/CDirect3D.cpp b/win32/CDirect3D.cpp index af6752c4..24244ea6 100644 --- a/win32/CDirect3D.cpp +++ b/win32/CDirect3D.cpp @@ -145,7 +145,7 @@ bool CDirect3D::Initialize(HWND hWnd) { auto defaults = S9xImGuiGetDefaults(); defaults.font_size = GUI.OSDSize; - defaults.spacing = defaults.font_size / 2.4; + defaults.spacing = (int)(defaults.font_size / 2.4); S9xImGuiInit(&defaults); ImGui_ImplDX9_Init(pDevice); Settings.DisplayIndicators = true; diff --git a/win32/CVulkan.cpp b/win32/CVulkan.cpp index 6f5178bf..51fdceab 100644 --- a/win32/CVulkan.cpp +++ b/win32/CVulkan.cpp @@ -13,7 +13,7 @@ bool CVulkan::InitImGui() { auto defaults = S9xImGuiGetDefaults(); defaults.font_size = GUI.OSDSize; - defaults.spacing = defaults.font_size / 2.4; + defaults.spacing = (int)(defaults.font_size / 2.4); S9xImGuiInit(&defaults); ImGui_ImplVulkan_LoadFunctions([](const char* function, void* instance) { diff --git a/win32/wconfig.cpp b/win32/wconfig.cpp index 5f70026d..e1977f04 100644 --- a/win32/wconfig.cpp +++ b/win32/wconfig.cpp @@ -800,7 +800,7 @@ void WinRegisterConfigItems() AddBoolC("Vsync", GUI.Vsync, false, "true to enable Vsync"); AddBoolC("ReduceInputLag", GUI.ReduceInputLag, false, "true to reduce input lag by hard synchronization"); AddBoolC("DWMSync", GUI.DWMSync, false, "sync to DWM compositor if it is running"); - AddUInt("OSDSize", GUI.OSDSize, 24, "Size of On-Screen Display"); + AddUIntC("OSDSize", GUI.OSDSize, 24, "Size of On-Screen Display"); #undef CATEGORY #define CATEGORY "Settings" AddUIntC("FrameSkip", Settings.SkipFrames, AUTO_FRAMERATE, "200=automatic (limits at 50/60 fps), 0=none, 1=skip every other, ..."); diff --git a/win32/wsnes9x.cpp b/win32/wsnes9x.cpp index 2fa2c6e9..d109e96f 100644 --- a/win32/wsnes9x.cpp +++ b/win32/wsnes9x.cpp @@ -7929,7 +7929,7 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) )==BST_CHECKED); { int newOSDSize = SendDlgItemMessage(hDlg, IDC_SPIN_OSD_SIZE, UDM_GETPOS, 0, 0); - bool need_reset = (Settings.AutoDisplayMessages != prevAutoDisplayMessages || newOSDSize != GUI.OSDSize); + bool need_reset = ((bool)Settings.AutoDisplayMessages != prevAutoDisplayMessages || newOSDSize != GUI.OSDSize); GUI.OSDSize = newOSDSize; if (need_reset) {