From 8d57b3a72cc826c587de9571e721da7b82b01562 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sat, 10 Sep 2022 13:59:40 +0200 Subject: [PATCH] source/Platform/Win32/Win32Display.cpp: Use SetWindowLongPtr/GetWindowLongPtr as LONG_PTR supports 64bit addresses. --- source/Platform/Win32/Win32Display.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Platform/Win32/Win32Display.cpp b/source/Platform/Win32/Win32Display.cpp index 90271a0..67993fa 100644 --- a/source/Platform/Win32/Win32Display.cpp +++ b/source/Platform/Win32/Win32Display.cpp @@ -333,11 +333,11 @@ LRESULT CALLBACK Win32Display::staticWndProc(HWND handle, UINT message, WPARAM w if (message == WM_NCCREATE) { LONG_PTR ptr = (LONG_PTR) ((LPCREATESTRUCT)lParam)->lpCreateParams; - ::SetWindowLong(handle, GWL_USERDATA, ptr); + ::SetWindowLongPtr(handle, GWL_USERDATA, ptr); display = (Win32Display*) ptr; } else { - display = (Win32Display*) ::GetWindowLong(handle, GWL_USERDATA); + display = (Win32Display*) ::GetWindowLongPtr(handle, GWL_USERDATA); } if (display) {