mirror of
https://github.com/narzoul/DDrawCompat
synced 2024-12-30 08:55:36 +01:00
Fixed clipping of desktop DC
This commit is contained in:
parent
a0919dcaa6
commit
481b09f489
@ -203,11 +203,18 @@ namespace Gdi
|
|||||||
|
|
||||||
POINT origin = {};
|
POINT origin = {};
|
||||||
GetDCOrgEx(origDc, &origin);
|
GetDCOrgEx(origDc, &origin);
|
||||||
const HWND hwnd = CALL_ORIG_FUNC(WindowFromDC)(origDc);
|
HWND hwnd = CALL_ORIG_FUNC(WindowFromDC)(origDc);
|
||||||
if (hwnd && GetDesktopWindow() != hwnd)
|
if (hwnd)
|
||||||
{
|
{
|
||||||
origin.x -= virtualScreenBounds.left;
|
if (GetDesktopWindow() == hwnd)
|
||||||
origin.y -= virtualScreenBounds.top;
|
{
|
||||||
|
hwnd = nullptr;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
origin.x -= virtualScreenBounds.left;
|
||||||
|
origin.y -= virtualScreenBounds.top;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compatDc.refCount = 1;
|
compatDc.refCount = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user