Fix UWP build

This commit is contained in:
Wojtek Figat
2021-03-27 19:27:22 +01:00
parent 732f74e5c9
commit 0754434295
3 changed files with 4 additions and 4 deletions

View File

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

View File

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

View File

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