Merge remote-tracking branch 'origin/master' into 1.2

This commit is contained in:
Wojtek Figat
2021-03-30 17:58:29 +02:00
38 changed files with 303 additions and 109 deletions

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)