[MPlayer-cvslog] r33726 - in trunk/gui/win32: dialogs.c gui.c preferences.c

ib subversion at mplayerhq.hu
Sun Jun 26 01:10:37 CEST 2011


Author: ib
Date: Sun Jun 26 01:10:37 2011
New Revision: 33726

Log:
Cast new user data value in SetWindowLongPtr() to LONG_PTR.

This makes the call compatible with both
32-bit and 64-bit versions of Windows.

Patch by Stephen Sheldon, sfsheldo gmail com.

Modified:
   trunk/gui/win32/dialogs.c
   trunk/gui/win32/gui.c
   trunk/gui/win32/preferences.c

Modified: trunk/gui/win32/dialogs.c
==============================================================================
--- trunk/gui/win32/dialogs.c	Sat Jun 25 19:30:19 2011	(r33725)
+++ trunk/gui/win32/dialogs.c	Sun Jun 26 01:10:37 2011	(r33726)
@@ -399,7 +399,7 @@ void display_openurlwindow(gui_t *gui, i
                         NULL,
                         hInstance,
                         NULL);
-   SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui);
+   SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui);
    ShowWindow(hWnd, SW_SHOW);
    UpdateWindow(hWnd);
 }
@@ -651,7 +651,7 @@ void display_playlistwindow(gui_t *gui)
                         NULL,
                         hInstance,
                         NULL);
-   SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD)gui);
+   SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)gui);
    updatetracklist(hWnd);
    DragAcceptFiles(hWnd,TRUE);
    ShowWindow(hWnd, SW_SHOW);
@@ -768,7 +768,7 @@ void display_skinbrowser(gui_t* gui)
                         NULL,
                         hInstance,
                         NULL);
-   SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui);
+   SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui);
    ShowWindow(hWnd, SW_SHOW);
    UpdateWindow(hWnd);
 }
@@ -897,7 +897,7 @@ void display_chapterselwindow(gui_t *gui
                         NULL,
                         hInstance,
                         NULL);
-   SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui);
+   SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui);
    ShowWindow(hWnd, SW_SHOW);
    UpdateWindow(hWnd);
 }
@@ -1111,7 +1111,7 @@ void display_eqwindow(gui_t *gui)
                         NULL,
                         hInstance,
                         NULL);
-   SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui);
+   SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui);
    ShowWindow(hWnd, SW_SHOW);
    UpdateWindow(hWnd);
 }

Modified: trunk/gui/win32/gui.c
==============================================================================
--- trunk/gui/win32/gui.c	Sat Jun 25 19:30:19 2011	(r33725)
+++ trunk/gui/win32/gui.c	Sun Jun 26 01:10:37 2011	(r33726)
@@ -1273,7 +1273,7 @@ static void maketransparent(HWND hwnd, C
 static int window_render(gui_t *gui, HWND hWnd, HDC hdc, window_priv_t *priv, window *desc, BITMAPINFO binfo)
 {
     int i;
-    SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui);
+    SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui);
     (gui->window_priv_count)++;
     gui->window_priv = realloc(gui->window_priv, sizeof(window_priv_t *) * gui->window_priv_count);
     priv = gui->window_priv[gui->window_priv_count - 1] = calloc(1, sizeof(window_priv_t));

Modified: trunk/gui/win32/preferences.c
==============================================================================
--- trunk/gui/win32/preferences.c	Sat Jun 25 19:30:19 2011	(r33725)
+++ trunk/gui/win32/preferences.c	Sun Jun 26 01:10:37 2011	(r33726)
@@ -707,7 +707,7 @@ void display_prefswindow(gui_t *gui)
                         NULL,
                         hInstance,
                         NULL);
-   SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui);
+   SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui);
    ShowWindow(hWnd, SW_SHOW);
    UpdateWindow(hWnd);
 }


More information about the MPlayer-cvslog mailing list