[SDL] Improper Windows message routine calling

Scott Watson baudtender1-SPAM-ME-NOT at comcast.net
Sat Sep 20 20:41:01 PDT 2003


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.

For example, in SDL_dx5events.c, at the end of the function 
DX5_HandleMessage(),
there's a call like this:
        } else if (userWindowProc) {
                return userWindowProc(hwnd, msg, wParam, lParam);
                }

which should be:
        } else if (userWindowProc) {
                return    
CallWindowProc(userWindowProc,hwnd,msg,wParam,lParam);
                }

Calling it improperly can cause a crash under at least XP.

S.W.








More information about the SDL mailing list