From c90d308b4575f03954b0bf32164fbe167bb09281 Mon Sep 17 00:00:00 2001 From: Herman Semenov Date: Sun, 15 Aug 2021 08:04:53 +0300 Subject: [PATCH] Fixed funcs for safe use in Win32/Win64 Signed-off-by: GermanAizek --- src/SFML/Window/Win32/WindowImplWin32.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SFML/Window/Win32/WindowImplWin32.cpp b/src/SFML/Window/Win32/WindowImplWin32.cpp index 92e8b8cf..ea0ad72e 100755 --- a/src/SFML/Window/Win32/WindowImplWin32.cpp +++ b/src/SFML/Window/Win32/WindowImplWin32.cpp @@ -343,7 +343,7 @@ void WindowImplWin32::setSize(const Vector2u& size) // SetWindowPos wants the total size of the window (including title bar and borders), // so we have to compute it RECT rectangle = {0, 0, static_cast(size.x), static_cast(size.y)}; - AdjustWindowRect(&rectangle, GetWindowLong(m_handle, GWL_STYLE), false); + AdjustWindowRect(&rectangle, GetWindowLongPtr(m_handle, GWL_STYLE), false); int width = rectangle.right - rectangle.left; int height = rectangle.bottom - rectangle.top; @@ -500,8 +500,8 @@ void WindowImplWin32::switchToFullscreen(const VideoMode& mode) } // Make the window flags compatible with fullscreen mode - SetWindowLongW(m_handle, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); - SetWindowLongW(m_handle, GWL_EXSTYLE, WS_EX_APPWINDOW); + SetWindowLongPtr(m_handle, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); + SetWindowLongPtr(m_handle, GWL_EXSTYLE, WS_EX_APPWINDOW); // Resize the window so that it fits the entire screen SetWindowPos(m_handle, HWND_TOP, 0, 0, mode.width, mode.height, SWP_FRAMECHANGED);