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(); auto defaults = S9xImGuiGetDefaults();
defaults.font_size = GUI.OSDSize; defaults.font_size = GUI.OSDSize;
defaults.spacing = defaults.font_size / 2.4; defaults.spacing = (int)(defaults.font_size / 2.4);
S9xImGuiInit(&defaults); S9xImGuiInit(&defaults);
ImGui_ImplDX9_Init(pDevice); ImGui_ImplDX9_Init(pDevice);
Settings.DisplayIndicators = true; Settings.DisplayIndicators = true;

View File

@ -13,7 +13,7 @@ bool CVulkan::InitImGui()
{ {
auto defaults = S9xImGuiGetDefaults(); auto defaults = S9xImGuiGetDefaults();
defaults.font_size = GUI.OSDSize; defaults.font_size = GUI.OSDSize;
defaults.spacing = defaults.font_size / 2.4; defaults.spacing = (int)(defaults.font_size / 2.4);
S9xImGuiInit(&defaults); S9xImGuiInit(&defaults);
ImGui_ImplVulkan_LoadFunctions([](const char* function, void* instance) { 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("Vsync", GUI.Vsync, false, "true to enable Vsync");
AddBoolC("ReduceInputLag", GUI.ReduceInputLag, false, "true to reduce input lag by hard synchronization"); 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"); 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 #undef CATEGORY
#define CATEGORY "Settings" #define CATEGORY "Settings"
AddUIntC("FrameSkip", Settings.SkipFrames, AUTO_FRAMERATE, "200=automatic (limits at 50/60 fps), 0=none, 1=skip every other, ..."); 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); )==BST_CHECKED);
{ {
int newOSDSize = SendDlgItemMessage(hDlg, IDC_SPIN_OSD_SIZE, UDM_GETPOS, 0, 0); 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; GUI.OSDSize = newOSDSize;
if (need_reset) if (need_reset)
{ {