fix crash on exit in fallout2
This commit is contained in:
parent
9c18999a11
commit
fc143416ad
1 changed files with 3 additions and 3 deletions
6
src/dd.c
6
src/dd.c
|
@ -1670,9 +1670,6 @@ ULONG dd_Release()
|
|||
|
||||
if (g_ddraw.hwnd && IsWindow(g_ddraw.hwnd))
|
||||
{
|
||||
/* restore old wndproc, subsequent ddraw creation will otherwise fail */
|
||||
real_SetWindowLongA(g_ddraw.hwnd, GWL_WNDPROC, (LONG)g_ddraw.wndproc);
|
||||
|
||||
/* restore old window size, required for games that can switch between windowed and fullscreen during runtime */
|
||||
if (g_ddraw.width)
|
||||
{
|
||||
|
@ -1692,6 +1689,9 @@ ULONG dd_Release()
|
|||
(rc.bottom - rc.top),
|
||||
SWP_NOMOVE | SWP_NOZORDER | SWP_NOOWNERZORDER);
|
||||
}
|
||||
|
||||
/* restore old wndproc, subsequent ddraw creation will otherwise fail */
|
||||
real_SetWindowLongA(g_ddraw.hwnd, GWL_WNDPROC, (LONG)g_ddraw.wndproc);
|
||||
}
|
||||
|
||||
memset(&g_ddraw, 0, sizeof(g_ddraw));
|
||||
|
|
Loading…
Reference in a new issue