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 = {};
|
||||
GetDCOrgEx(origDc, &origin);
|
||||
const HWND hwnd = CALL_ORIG_FUNC(WindowFromDC)(origDc);
|
||||
if (hwnd && GetDesktopWindow() != hwnd)
|
||||
HWND hwnd = CALL_ORIG_FUNC(WindowFromDC)(origDc);
|
||||
if (hwnd)
|
||||
{
|
||||
origin.x -= virtualScreenBounds.left;
|
||||
origin.y -= virtualScreenBounds.top;
|
||||
if (GetDesktopWindow() == hwnd)
|
||||
{
|
||||
hwnd = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
origin.x -= virtualScreenBounds.left;
|
||||
origin.y -= virtualScreenBounds.top;
|
||||
}
|
||||
}
|
||||
|
||||
compatDc.refCount = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user