[SDL] [SDL][PATCH] Some patches for SDL-1.2.2
pmandin at caramail.com
Fri Aug 24 05:58:01 PDT 2001
Apparently I am not going mad as I previously thought.After doing
some testing David and I have found out that the SetEnvironmentVariable
Windows API stores it's variables in a different place to the libc
Since environment variables seem to be used on WinCE, Windows, Linux and
are probably also available under other OSes, is there any reason why
SDL_putenv and SDL_getenv are not available on at least Windows and
Linux, so that there is a uniform way of setting environment variables
under various Oses that SDL supports and that in turn support
David MacCormack wrote:
>> 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.
> 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).
More information about the SDL