-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
lib/libUPnP/patches/0041-platinum-win-Changed-GWL_USERDATA-to-GWLP_USERDATA-a.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|