mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
make sure we always got a cliplist
This commit is contained in:
parent
aac405031e
commit
649ba3050a
@ -3,6 +3,7 @@
|
||||
#include "IDirectDrawClipper.h"
|
||||
#include "ddclipper.h"
|
||||
#include "debug.h"
|
||||
#include "dd.h"
|
||||
|
||||
|
||||
HRESULT ddc_GetClipList(IDirectDrawClipperImpl* This, LPRECT lpRect, LPRGNDATA lpClipList, LPDWORD lpdwSiz)
|
||||
@ -168,6 +169,12 @@ HRESULT ddc_SetHWnd(IDirectDrawClipperImpl* This, DWORD dwFlags, HWND hWnd)
|
||||
*/
|
||||
This->hwnd = hWnd;
|
||||
|
||||
if (hWnd && !This->region && g_ddraw.width)
|
||||
{
|
||||
RECT rc = { 0, 0, g_ddraw.width, g_ddraw.height };
|
||||
ddc_SetClipRect(This, &rc);
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&This->cs);
|
||||
return DD_OK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user