1
0
forked from 0ad/0ad

move hInst = GetModuleHandle to wsdl_init, to make sure it's done before anything else

This was SVN commit r664.
This commit is contained in:
janwas 2004-07-08 15:16:31 +00:00
parent 8760a628a4
commit 92f14cd90a

View File

@ -461,6 +461,8 @@ void enable_kbd_hook(bool enable)
static int wsdl_init()
{
hInst = GetModuleHandle(0);
// ignore BoundsChecker warnings here. subsystem is set to "Windows"
// to avoid the OS opening a console on startup (ugly). that means
// stdout isn't associated with a lowio handle; _close ends up
@ -469,6 +471,7 @@ static int wsdl_init()
if(!ret)
debug_warn("stdout freopen failed");
setvbuf(stdout, 0, _IONBF, 0);
return 0;
}
@ -571,8 +574,6 @@ int SDL_SetVideoMode(int w, int h, int bpp, unsigned long flags)
* pixel format isn't supposed to be changed more than once
*/
hInst = GetModuleHandle(0);
/* register window class */
static WNDCLASS wc;
wc.style = CS_OWNDC;