diff src/video/windx5/SDL_dx5events.c @ 1280:f61f045343d3

Re-query the SDL_WINDOWID each time we initialize the video
author Sam Lantinga <slouken@libsdl.org>
date Sun, 29 Jan 2006 06:11:38 +0000
parents 7c7ddaf195bf
children ea3888b472bf
line wrap: on
line diff
--- a/src/video/windx5/SDL_dx5events.c	Sat Jan 28 05:47:11 2006 +0000
+++ b/src/video/windx5/SDL_dx5events.c	Sun Jan 29 06:11:38 2006 +0000
@@ -848,6 +848,7 @@
 
 int DX5_CreateWindow(_THIS)
 {
+	char *windowid = getenv("SDL_WINDOWID");
 	int i;
 
 	/* Clear out DirectInput variables in case we fail */
@@ -861,8 +862,10 @@
 #define CS_BYTEALIGNCLIENT	0
 #endif
 	SDL_RegisterApp("SDL_app", CS_BYTEALIGNCLIENT, 0);
+
+	SDL_windowid = (windowid != NULL);
 	if ( SDL_windowid ) {
-		SDL_Window = (HWND)strtol(SDL_windowid, NULL, 0);
+		SDL_Window = (HWND)strtol(windowid, NULL, 0);
 		if ( SDL_Window == NULL ) {
 			SDL_SetError("Couldn't get user specified window");
 			return(-1);