win32: get rid of some warnings

This commit is contained in:
OV2 2023-05-08 19:02:50 +02:00
parent 354f9cbcab
commit f0f3c5502c
4 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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) {

View File

@ -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, ...");

View File

@ -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)
{