add separate GetDeviceCaps hook for system dlls

This commit is contained in:
FunkyFr3sh 2024-12-22 23:41:09 +01:00
parent c5058f8371
commit 07aab3b8d2
4 changed files with 24 additions and 0 deletions

View file

@ -956,6 +956,21 @@ int WINAPI fake_GetDeviceCaps(HDC hdc, int index)
return real_GetDeviceCaps(hdc, index);
}
int WINAPI fake_GetDeviceCaps_system(HDC hdc, int index)
{
if (g_ddraw.ref &&
g_ddraw.bpp == 8 &&
((g_ddraw.hwnd && WindowFromDC(hdc) == g_ddraw.hwnd) || WindowFromDC(hdc) == GetDesktopWindow()))
{
if (index == RASTERCAPS)
{
return RC_PALETTE | real_GetDeviceCaps(hdc, index);
}
}
return real_GetDeviceCaps(hdc, index);
}
BOOL WINAPI fake_StretchBlt(
HDC hdcDest,
int xDest,