Commit a316fe73 authored by hybrid's avatar hybrid

Make the win32 device close again.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1024 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 3f1e88c2
...@@ -108,7 +108,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) ...@@ -108,7 +108,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_SETCURSOR: case WM_SETCURSOR:
envm = getEnvMapperFromHWnd(hWnd); envm = getEnvMapperFromHWnd(hWnd);
if (envm && !envm->irrDev->getWin32CursorControl()->isVisible()) if (envm && !envm->irrDev->getWin32CursorControl()->isVisible())
{ {
SetCursor(NULL); SetCursor(NULL);
return 0; return 0;
...@@ -658,10 +658,11 @@ void CIrrDeviceWin32::present(video::IImage* image, s32 windowId, core::rect<s32 ...@@ -658,10 +658,11 @@ void CIrrDeviceWin32::present(video::IImage* image, s32 windowId, core::rect<s32
//! notifies the device that it should close itself //! notifies the device that it should close itself
void CIrrDeviceWin32::closeDevice() void CIrrDeviceWin32::closeDevice()
{ {
DestroyWindow(HWnd); PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE);
PostQuitMessage(0); PostQuitMessage(0);
MSG msg; MSG msg;
GetMessage(&msg, NULL, WM_QUIT, WM_QUIT); PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE);
DestroyWindow(HWnd);
} }
......
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