windows32 class unregister fixes by namtabmai
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3244 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
8813f08a8a
commit
9d1cc03094
|
@ -624,8 +624,8 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params)
|
|||
SetForegroundWindow(HWnd);
|
||||
|
||||
// get the codepage used for keyboard input
|
||||
KEYBOARD_INPUT_HKL = GetKeyboardLayout(0);
|
||||
KEYBOARD_INPUT_CODEPAGE = LocaleIdToCodepage( LOWORD(KEYBOARD_INPUT_HKL) );
|
||||
KEYBOARD_INPUT_HKL = GetKeyboardLayout(0);
|
||||
KEYBOARD_INPUT_CODEPAGE = LocaleIdToCodepage( LOWORD(KEYBOARD_INPUT_HKL) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -903,8 +903,13 @@ void CIrrDeviceWin32::closeDevice()
|
|||
PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE);
|
||||
PostQuitMessage(0);
|
||||
PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE);
|
||||
if (ExternalWindow)
|
||||
if (!ExternalWindow)
|
||||
{
|
||||
DestroyWindow(HWnd);
|
||||
const fschar_t* ClassName = __TEXT("CIrrDeviceWin32");
|
||||
HINSTANCE hInstance = GetModuleHandle(0);
|
||||
UnregisterClass(ClassName, hInstance);
|
||||
}
|
||||
Close=true;
|
||||
}
|
||||
|
||||
|
|
|
@ -710,7 +710,13 @@ void CIrrDeviceWinCE::closeDevice()
|
|||
PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE);
|
||||
PostQuitMessage(0);
|
||||
PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE);
|
||||
DestroyWindow(HWnd);
|
||||
if (!ExternalWindow)
|
||||
{
|
||||
DestroyWindow(HWnd);
|
||||
const fschar_t* ClassName = __TEXT("CIrrDeviceWin32");
|
||||
HINSTANCE hInstance = GetModuleHandle(0);
|
||||
UnregisterClass(ClassName, hInstance);
|
||||
}
|
||||
Close=true;
|
||||
}
|
||||
|
||||
|
|
|
@ -127,6 +127,7 @@ bool COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters params, CIrrDevi
|
|||
if (!temporary_wnd)
|
||||
{
|
||||
os::Printer::log("Cannot create a temporary window.", ELL_ERROR);
|
||||
UnregisterClass(ClassName, lhInstance);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -197,6 +198,7 @@ bool COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters params, CIrrDevi
|
|||
os::Printer::log("Cannot create a GL device context", "No suitable format for temporary window.", ELL_ERROR);
|
||||
ReleaseDC(temporary_wnd, HDc);
|
||||
DestroyWindow(temporary_wnd);
|
||||
UnregisterClass(ClassName, lhInstance);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -213,6 +215,7 @@ bool COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters params, CIrrDevi
|
|||
os::Printer::log("Cannot create a temporary GL rendering context.", ELL_ERROR);
|
||||
ReleaseDC(temporary_wnd, HDc);
|
||||
DestroyWindow(temporary_wnd);
|
||||
UnregisterClass(ClassName, lhInstance);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -228,6 +231,7 @@ bool COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters params, CIrrDevi
|
|||
wglDeleteContext(hrc);
|
||||
ReleaseDC(temporary_wnd, HDc);
|
||||
DestroyWindow(temporary_wnd);
|
||||
UnregisterClass(ClassName, lhInstance);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -318,6 +322,7 @@ bool COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters params, CIrrDevi
|
|||
wglDeleteContext(hrc);
|
||||
ReleaseDC(temporary_wnd, HDc);
|
||||
DestroyWindow(temporary_wnd);
|
||||
UnregisterClass(ClassName, lhInstance);
|
||||
|
||||
// get hdc
|
||||
HDc=GetDC(Window);
|
||||
|
|
Loading…
Reference in New Issue