diff src/video/win32/SDL_win32window.c @ 3566:07c8339c95c6

Fixed bug #905 Give the foreign window message proc more control over Windows events. This may need to be adjusted when we add the capability for the app to specify whether it wants SDL to handle input for the window or not.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 15 Dec 2009 09:20:10 +0000
parents e96be66e3673
children 64ce267332c6
line wrap: on
line diff
--- a/src/video/win32/SDL_win32window.c	Tue Dec 15 08:11:06 2009 +0000
+++ b/src/video/win32/SDL_win32window.c	Tue Dec 15 09:20:10 2009 +0000
@@ -112,11 +112,10 @@
 
     /* Set up the window proc function */
     data->wndproc = (WNDPROC) GetWindowLongPtr(hwnd, GWLP_WNDPROC);
-    if (data->wndproc == NULL) {
-        data->wndproc = DefWindowProc;
-    } else {
-        SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) WIN_WindowProc);
+    if (data->wndproc == DefWindowProc) {
+        data->wndproc = NULL;
     }
+    SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) WIN_WindowProc);
 
     /* Fill in the SDL window with the window data */
     {