From 10a356c23bf70df1701855cc74db645f6503d48c Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 29 Oct 2022 13:00:12 -0700 Subject: [PATCH] UWP: Avoid some float conversion warnings. --- UWP/Common/DeviceResources.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/UWP/Common/DeviceResources.cpp b/UWP/Common/DeviceResources.cpp index 8527d77f51..ab1bbcbf40 100644 --- a/UWP/Common/DeviceResources.cpp +++ b/UWP/Common/DeviceResources.cpp @@ -470,13 +470,13 @@ void DX::DeviceResources::SetWindow(CoreWindow^ window) try { const auto dm = hdi->GetCurrentDisplayMode(); - const unsigned int hdmi_width = dm->ResolutionWidthInRawPixels; - const unsigned int hdmi_height = dm->ResolutionHeightInRawPixels; + const float hdmi_width = (float)dm->ResolutionWidthInRawPixels; + const float hdmi_height = (float)dm->ResolutionHeightInRawPixels; // If we're running on Xbox, use the HDMI mode instead of the CoreWindow size. // In UWP, the CoreWindow is always 1920x1080, even when running at 4K. m_logicalSize = Windows::Foundation::Size(hdmi_width, hdmi_height); - m_dpi = currentDisplayInformation->LogicalDpi * 1.5; + m_dpi = currentDisplayInformation->LogicalDpi * 1.5f; } catch (const Platform::Exception^) {