mirror of
https://github.com/narzoul/DDrawCompat
synced 2024-12-30 08:55:36 +01:00
Disabled the VirtualizeDesktopPainting shim
This commit is contained in:
parent
f973291f93
commit
b78ea774d7
@ -124,6 +124,11 @@ namespace
|
||||
|
||||
void setClippingRegion(HDC compatDc, HDC origDc, HWND hwnd, bool isMenuWindow, const POINT& origin)
|
||||
{
|
||||
if (GetDesktopWindow() == hwnd)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
HRGN clipRgn = CreateRectRgn(0, 0, 0, 0);
|
||||
if (1 == GetClipRgn(origDc, clipRgn))
|
||||
{
|
||||
@ -167,7 +172,7 @@ namespace CompatGdiDc
|
||||
return it->second.dc;
|
||||
}
|
||||
|
||||
const HWND hwnd = WindowFromDC(origDc);
|
||||
const HWND hwnd = CALL_ORIG_FUNC(WindowFromDC)(origDc);
|
||||
const bool isMenuWindow = hwnd && 0x8000 == GetClassLongPtr(hwnd, GCW_ATOM);
|
||||
if (isMenuWindow && !isMenuPaintDc)
|
||||
{
|
||||
|
@ -83,6 +83,15 @@ namespace
|
||||
|
||||
LRESULT WINAPI defWindowProcW(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (WM_CREATE == msg)
|
||||
{
|
||||
auto className = reinterpret_cast<CREATESTRUCTW*>(lParam)->lpszClass;
|
||||
if (reinterpret_cast<DWORD>(className) > 0xFFFF &&
|
||||
0 == lstrcmpW(className, L"CompatWindowDesktopReplacement"))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return defPaintProc(hwnd, msg, wParam, lParam, CALL_ORIG_FUNC(DefWindowProcW), "defWindowProcW");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user