Skip to content

Commit

Permalink
[platinum] add patch for 80f22d1
Browse files Browse the repository at this point in the history
  • Loading branch information
Rechi committed Jan 13, 2017
1 parent 80f22d1 commit dda6a73
Showing 1 changed file with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
From 80f22d1f8613411f85ba4826f97d92c8124d4a4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A4r=20Bj=C3=B6rklund?= <[email protected]>
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

0 comments on commit dda6a73

Please sign in to comment.