diff src/main/win32/SDL_main.c @ 145:29a638dc26db

Applied David MacCormack's patch to fix SDL_WINDOWID on Windows, and added a function to cache the application handle so DirectInput still works properly.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 09 Aug 2001 12:21:32 +0000
parents 9ef74357a5fb
children 0e66fd980014
line wrap: on
line diff
--- a/src/main/win32/SDL_main.c	Thu Aug 09 06:14:06 2001 +0000
+++ b/src/main/win32/SDL_main.c	Thu Aug 09 12:21:32 2001 +0000
@@ -199,12 +199,16 @@
 	atexit(SDL_Quit);
 
 #ifndef DISABLE_VIDEO
-	/* Create and register our class */
+	/* Create and register our class *
+      DJM: If we do this here, the user nevers gets a chance to
+      putenv(SDL_WINDOWID).  This is already called later by
+      the (DIB|DX5)_CreateWindow function, so it should be
+      safe to comment it out here.
 	if ( SDL_RegisterApp(appname, CS_BYTEALIGNCLIENT, 
 	                     GetModuleHandle(NULL)) < 0 ) {
 		ShowError("WinMain() error", SDL_GetError());
 		exit(1);
-	}
+	}*/
 #endif /* !DISABLE_VIDEO */
 
 	/* Run the application main() code */