Bläddra i källkod

fixed bug that cause invaders sample to be unable to run

Lee Zhen Yong 11 år sedan
förälder
incheckning
f9d4f01685
1 ändrade filer med 8 tillägg och 8 borttagningar
  1. 8 8
      Samples/shell/src/win32/ShellWin32.cpp

+ 8 - 8
Samples/shell/src/win32/ShellWin32.cpp

@@ -137,14 +137,6 @@ bool Shell::OpenWindow(const char* name, ShellRenderInterfaceExtensions *_shell_
 	SetWindowLong(window_handle, GWL_EXSTYLE, extended_style);
 	SetWindowLong(window_handle, GWL_STYLE, style);
 
-	// Resize the window.
-	SetWindowPos(window_handle, HWND_TOP, 0, 0, window_rect.right - window_rect.left, window_rect.bottom - window_rect.top, SWP_NOACTIVATE);
-
-	// Display the new window
-	ShowWindow(window_handle, SW_SHOW);
-	SetForegroundWindow(window_handle);
-	SetFocus(window_handle);
-
 	if (_shell_renderer != NULL)
 	{
 		shell_renderer = _shell_renderer;
@@ -155,6 +147,14 @@ bool Shell::OpenWindow(const char* name, ShellRenderInterfaceExtensions *_shell_
 		}
 	}
 
+	// Resize the window.
+	SetWindowPos(window_handle, HWND_TOP, 0, 0, window_rect.right - window_rect.left, window_rect.bottom - window_rect.top, SWP_NOACTIVATE);
+
+	// Display the new window
+	ShowWindow(window_handle, SW_SHOW);
+	SetForegroundWindow(window_handle);
+	SetFocus(window_handle);
+
     return true;
 }