comparison src/video/wincommon/SDL_wingl.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 031e093ba2a5
children c9b51268668f
comparison
equal deleted inserted replaced
1279:e867f327aa54 1280:f61f045343d3
42 42
43 /* If setting the HDC fails, we may need to recreate the window (MSDN) */ 43 /* If setting the HDC fails, we may need to recreate the window (MSDN) */
44 static int WIN_GL_ResetWindow(_THIS) 44 static int WIN_GL_ResetWindow(_THIS)
45 { 45 {
46 int status = 0; 46 int status = 0;
47 int can_reset = 1; 47
48
49 /* If we were passed a window, then we can't create a new one */
50 if ( SDL_windowid ) {
51 can_reset = 0;
52 }
53 #if 0 /* This doesn't work with DirectX code (see CVS comments) */ 48 #if 0 /* This doesn't work with DirectX code (see CVS comments) */
54 #ifndef _WIN32_WCE /* FIXME WinCE needs the UNICODE version of CreateWindow() */ 49 #ifndef _WIN32_WCE /* FIXME WinCE needs the UNICODE version of CreateWindow() */
55 if ( can_reset ) { 50 /* If we were passed a window, then we can't create a new one */
51 if ( !SDL_windowid ) {
56 /* Save the existing window attributes */ 52 /* Save the existing window attributes */
57 LONG style; 53 LONG style;
58 RECT rect = { 0, 0, 0, 0 }; 54 RECT rect = { 0, 0, 0, 0 };
59 style = GetWindowLong(SDL_Window, GWL_STYLE); 55 style = GetWindowLong(SDL_Window, GWL_STYLE);
60 GetWindowRect(SDL_Window, &rect); 56 GetWindowRect(SDL_Window, &rect);