diff --git a/Source/Engine/Main/UWP/main.h b/Source/Engine/Main/UWP/main.h index ab48a0990..254c0fedb 100644 --- a/Source/Engine/Main/UWP/main.h +++ b/Source/Engine/Main/UWP/main.h @@ -189,10 +189,10 @@ public: *height = bounds.Height; } - void GetDpi(float* dpi) override + void GetDpi(int* dpi) override { auto currentDisplayInformation = Windows::Graphics::Display::DisplayInformation::GetForCurrentView(); - *dpi = currentDisplayInformation->LogicalDpi; + *dpi = (int)currentDisplayInformation->LogicalDpi; } void GetTitle(wchar_t* buffer, int bufferLength) override diff --git a/Source/Engine/Platform/UWP/UWPPlatformImpl.h b/Source/Engine/Platform/UWP/UWPPlatformImpl.h index f636f9983..99d18d67f 100644 --- a/Source/Engine/Platform/UWP/UWPPlatformImpl.h +++ b/Source/Engine/Platform/UWP/UWPPlatformImpl.h @@ -121,7 +121,7 @@ public: virtual void SetMousePosition(float x, float y) = 0; virtual void GetMousePosition(float* x, float* y) = 0; virtual void GetBounds(float* x, float* y, float* width, float* height) = 0; - virtual void GetDpi(float* dpi) = 0; + virtual void GetDpi(int* dpi) = 0; virtual void GetTitle(wchar_t* buffer, int bufferLength) = 0; virtual void SetTitle(const wchar_t* title) = 0; virtual int GetGamepadsCount() = 0; diff --git a/Source/Engine/Platform/Win32/Win32Platform.cpp b/Source/Engine/Platform/Win32/Win32Platform.cpp index e01a8a8e1..b4140163f 100644 --- a/Source/Engine/Platform/Win32/Win32Platform.cpp +++ b/Source/Engine/Platform/Win32/Win32Platform.cpp @@ -320,7 +320,7 @@ void* Win32Platform::AllocatePages(uint64 numPages, uint64 pageSize) const uint64 numBytes = numPages * pageSize; // Use VirtualAlloc to allocate page-aligned memory - return VirtualAlloc(nullptr, numBytes, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); + return VirtualAlloc(nullptr, (SIZE_T)numBytes, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); } void Win32Platform::FreePages(void* ptr)