diff options
-rw-r--r-- | lib/libUPnP/patches/0041-platinum-win-Changed-GWL_USERDATA-to-GWLP_USERDATA-a.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/libUPnP/patches/0041-platinum-win-Changed-GWL_USERDATA-to-GWLP_USERDATA-a.patch b/lib/libUPnP/patches/0041-platinum-win-Changed-GWL_USERDATA-to-GWLP_USERDATA-a.patch new file mode 100644 index 0000000000..2edbc979ba --- /dev/null +++ b/lib/libUPnP/patches/0041-platinum-win-Changed-GWL_USERDATA-to-GWLP_USERDATA-a.patch @@ -0,0 +1,44 @@ +From 80f22d1f8613411f85ba4826f97d92c8124d4a4b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A4r=20Bj=C3=B6rklund?= <per.bjorklund@gmail.com> +Date: Fri, 13 Jan 2017 11:40:11 +0100 +Subject: [PATCH] [win][platinum] Changed GWL_USERDATA to GWLP_USERDATA and + updated pointer cast + +--- + lib/libUPnP/Neptune/Source/System/Win32/NptWin32MessageQueue.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lib/libUPnP/Neptune/Source/System/Win32/NptWin32MessageQueue.cpp b/lib/libUPnP/Neptune/Source/System/Win32/NptWin32MessageQueue.cpp +index 921fc1af68..f415b851d5 100644 +--- a/lib/libUPnP/Neptune/Source/System/Win32/NptWin32MessageQueue.cpp ++++ b/lib/libUPnP/Neptune/Source/System/Win32/NptWin32MessageQueue.cpp +@@ -81,7 +81,7 @@ NPT_Win32WindowMessageQueue::NPT_Win32WindowMessageQueue() + // is incorrectly defined, so we'll get a C4244 warning + #endif // _MSC_VER + if (m_WindowHandle) { +- SetWindowLongPtr(m_WindowHandle, GWL_USERDATA, NPT_POINTER_TO_LONG(this)); ++ SetWindowLongPtr(m_WindowHandle, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this)); + } + #if defined(_MSC_VER) + #pragma warning( pop ) +@@ -95,7 +95,7 @@ NPT_Win32WindowMessageQueue::NPT_Win32WindowMessageQueue() + NPT_Win32WindowMessageQueue::~NPT_Win32WindowMessageQueue() + { + // remove ourself as user data to ensure we're not called anymore +- SetWindowLongPtr(m_WindowHandle, GWL_USERDATA, 0); ++ SetWindowLongPtr(m_WindowHandle, GWLP_USERDATA, 0); + + // destroy the hidden window + DestroyWindow(m_WindowHandle); +@@ -124,7 +124,7 @@ NPT_Win32WindowMessageQueue::WindowProcedure(HWND window, + #pragma warning( disable: 4312) // we have to test for this because GetWindowLongPtr + // is incorrectly defined, so we'll get a C4244 warning + #endif // _MSC_VER +- NPT_Win32WindowMessageQueue* queue = reinterpret_cast<NPT_Win32WindowMessageQueue *>(GetWindowLongPtr(window, GWL_USERDATA)); ++ NPT_Win32WindowMessageQueue* queue = reinterpret_cast<NPT_Win32WindowMessageQueue *>(GetWindowLongPtr(window, GWLP_USERDATA)); + #if defined(_MSC_VER) + #pragma warning( pop ) + #endif // _MSC_VER +-- +2.11.0 + |