changeset 721:ab0656314eef

Date: Thu, 18 Sep 2003 14:24:35 -0400 From: Scott Watson Subject: [SDL] Improper Windows message routine calling If this hasn't been caught yet, there's an improper method of calling a user's window message routine in the various SDL_xxevents.c files. Calling it improperly can cause a crash under at least XP.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 21 Sep 2003 18:40:51 +0000
parents f90d80d68071
children 90dfd3f5782c
files src/video/windib/SDL_dibevents.c src/video/windx5/SDL_dx5events.c
diffstat 2 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/windib/SDL_dibevents.c	Sun Sep 21 18:32:04 2003 +0000
+++ b/src/video/windib/SDL_dibevents.c	Sun Sep 21 18:40:51 2003 +0000
@@ -177,7 +177,7 @@
 				along to any win32 specific window proc.
 			 */
 			} else if (userWindowProc) {
-				return userWindowProc(hwnd, msg, wParam, lParam);
+				return CallWindowProc(userWindowProc, hwnd, msg, wParam, lParam);
 			}
 		}
 		break;
--- a/src/video/windx5/SDL_dx5events.c	Sun Sep 21 18:32:04 2003 +0000
+++ b/src/video/windx5/SDL_dx5events.c	Sun Sep 21 18:40:51 2003 +0000
@@ -537,13 +537,13 @@
 				wmmsg.lParam = lParam;
 				posted = SDL_PrivateSysWMEvent(&wmmsg);
 
-         /* DJM: If the user isn't watching for private messages in her
-            SDL event loop, then pass it along to any win32 specific
-            window proc.
-          */
-         } else if (userWindowProc) {
-            return userWindowProc(hwnd, msg, wParam, lParam);
-         }
+			/* DJM: If the user isn't watching for private
+				messages in her SDL event loop, then pass it
+				along to any win32 specific window proc.
+			 */
+			} else if (userWindowProc) {
+				return CallWindowProc(userWindowProc, hwnd, msg, wParam, lParam);
+			}
 		}
 		break;
 	}