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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40722
This commit is contained in:
Sam Lantinga 2003-09-21 18:40:51 +00:00
parent 2aa25e175e
commit 773e8e18c4
2 changed files with 8 additions and 8 deletions

View file

@ -177,7 +177,7 @@ LONG
along to any win32 specific window proc. along to any win32 specific window proc.
*/ */
} else if (userWindowProc) { } else if (userWindowProc) {
return userWindowProc(hwnd, msg, wParam, lParam); return CallWindowProc(userWindowProc, hwnd, msg, wParam, lParam);
} }
} }
break; break;

View file

@ -537,13 +537,13 @@ LONG
wmmsg.lParam = lParam; wmmsg.lParam = lParam;
posted = SDL_PrivateSysWMEvent(&wmmsg); posted = SDL_PrivateSysWMEvent(&wmmsg);
/* DJM: If the user isn't watching for private messages in her /* DJM: If the user isn't watching for private
SDL event loop, then pass it along to any win32 specific messages in her SDL event loop, then pass it
window proc. along to any win32 specific window proc.
*/ */
} else if (userWindowProc) { } else if (userWindowProc) {
return userWindowProc(hwnd, msg, wParam, lParam); return CallWindowProc(userWindowProc, hwnd, msg, wParam, lParam);
} }
} }
break; break;
} }