[SDL] window id hack...

David MacCormack djm at maccormack.net
Thu Aug 9 00:44:00 PDT 2001


>
> I stand corrected.  It seems that the selection of "Multithreaded DLL"
> tells the application (and SDL) to link with msvcrt.lib -- so same effect,
> different means.
>
> Dave
>
>

But the SDL_WINDOWID hack is still busted (at least on win32).
SDL_RegisterApp is being called before the user's main(...).  And because
SDL_RegisterApp is the one checking for SDL_WINDOWID, the user never has a
chance to set it.

Of course I may be missing something, but I don't think it needs to be
called from WinMain.  On win32, all SDL_RegisterApp does is register the
window class and setup the trackmouse stuff, but
(DIB|DX5)_CreateWindow(...) calls SDL_RegisterApp before it tries to
create the window, so the same stuff is done later anyway.  So simply
commenting out the call to SDL_RegisterApp in WinMain (plus the few other
changes included in the patch) does the trick (as can be seen the the
demo apps I sent).

Dave

-- 
----------------
David MacCormack
djm at maccormack.net





More information about the SDL mailing list