mirror of
https://github.com/narzoul/DDrawCompat
synced 2024-12-30 08:55:36 +01:00
Fixed clipping of monitor-specific DCs
This commit is contained in:
parent
97e08f7988
commit
d268c51d8f
@ -107,17 +107,13 @@ namespace
|
|||||||
|
|
||||||
void setClippingRegion(const CompatDc& compatDc, HWND hwnd, const POINT& origin, const RECT& virtualScreenBounds)
|
void setClippingRegion(const CompatDc& compatDc, HWND hwnd, const POINT& origin, const RECT& virtualScreenBounds)
|
||||||
{
|
{
|
||||||
|
Gdi::Region sysRgn;
|
||||||
|
GetRandomRgn(compatDc.origDc, sysRgn, SYSRGN);
|
||||||
if (hwnd)
|
if (hwnd)
|
||||||
{
|
{
|
||||||
Gdi::Region sysRgn;
|
|
||||||
GetRandomRgn(compatDc.origDc, sysRgn, SYSRGN);
|
|
||||||
OffsetRgn(sysRgn, -virtualScreenBounds.left, -virtualScreenBounds.top);
|
OffsetRgn(sysRgn, -virtualScreenBounds.left, -virtualScreenBounds.top);
|
||||||
SelectClipRgn(compatDc.dc, sysRgn);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SelectClipRgn(compatDc.dc, nullptr);
|
|
||||||
}
|
}
|
||||||
|
SelectClipRgn(compatDc.dc, sysRgn);
|
||||||
|
|
||||||
Gdi::Region clipRgn;
|
Gdi::Region clipRgn;
|
||||||
if (1 == GetClipRgn(compatDc.origDc, clipRgn))
|
if (1 == GetClipRgn(compatDc.origDc, clipRgn))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user