From 92f14cd90a7ed72934873801a25ddf6addbe921e Mon Sep 17 00:00:00 2001 From: janwas Date: Thu, 8 Jul 2004 15:16:31 +0000 Subject: [PATCH] move hInst = GetModuleHandle to wsdl_init, to make sure it's done before anything else This was SVN commit r664. --- source/lib/sysdep/win/wsdl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/lib/sysdep/win/wsdl.cpp b/source/lib/sysdep/win/wsdl.cpp index bd6ba13cf1..20706de763 100755 --- a/source/lib/sysdep/win/wsdl.cpp +++ b/source/lib/sysdep/win/wsdl.cpp @@ -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;