You need to sign in or sign up before continuing.
Commit 7e20fd0d authored by cutealien's avatar cutealien

- Use SW_SHOWNORMAL instead of SW_SHOW in first ShowWindow (recommended by msdn)

- Fix problem that NULL device did steal focus away from other devices when created.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3461 dfc29bdd-3216-0410-991c-e03cc46cb475
parent bdb55248
...@@ -585,7 +585,7 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params) ...@@ -585,7 +585,7 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params)
// CreationParams.WindowSize.Width = realWidth; // CreationParams.WindowSize.Width = realWidth;
// CreationParams.WindowSize.Height = realHeight; // CreationParams.WindowSize.Height = realHeight;
ShowWindow(HWnd, SW_SHOW); ShowWindow(HWnd, SW_SHOWNORMAL);
UpdateWindow(HWnd); UpdateWindow(HWnd);
// fix ugly ATI driver bugs. Thanks to ariaci // fix ugly ATI driver bugs. Thanks to ariaci
...@@ -629,8 +629,11 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params) ...@@ -629,8 +629,11 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params)
EnvMap.push_back(em); EnvMap.push_back(em);
// set this as active window // set this as active window
SetActiveWindow(HWnd); if ( HWnd )
SetForegroundWindow(HWnd); {
SetActiveWindow(HWnd);
SetForegroundWindow(HWnd);
}
// get the codepage used for keyboard input // get the codepage used for keyboard input
KEYBOARD_INPUT_HKL = GetKeyboardLayout(0); KEYBOARD_INPUT_HKL = GetKeyboardLayout(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment