ddraw: Clear the focus and device windows on DDSCL_NORMAL.
This commit is contained in:
parent
2ec0c7bfdc
commit
a5af10e12b
|
@ -606,13 +606,6 @@ static HRESULT ddraw_set_focus_window(IDirectDrawImpl *ddraw, HWND window)
|
||||||
/* Use the focus window for drawing too. */
|
/* Use the focus window for drawing too. */
|
||||||
ddraw->dest_window = ddraw->focuswindow;
|
ddraw->dest_window = ddraw->focuswindow;
|
||||||
|
|
||||||
/* Destroy the device window, if we have one. */
|
|
||||||
if (ddraw->devicewindow)
|
|
||||||
{
|
|
||||||
DestroyWindow(ddraw->devicewindow);
|
|
||||||
ddraw->devicewindow = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -828,6 +821,13 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd,
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (This->cooperative_level & DDSCL_CREATEDEVICEWINDOW)
|
||||||
|
DestroyWindow(This->devicewindow);
|
||||||
|
This->devicewindow = NULL;
|
||||||
|
This->focuswindow = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if ((This->cooperative_level & DDSCL_EXCLUSIVE)
|
if ((This->cooperative_level & DDSCL_EXCLUSIVE)
|
||||||
&& (hwnd != window || !(cooplevel & DDSCL_EXCLUSIVE)))
|
&& (hwnd != window || !(cooplevel & DDSCL_EXCLUSIVE)))
|
||||||
|
|
Loading…
Reference in New Issue