mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-14 22:03:27 +01:00
fix return value for NUMCOLORS on desktop window
This commit is contained in:
parent
9a015c47cb
commit
8be9875553
@ -893,10 +893,22 @@ int WINAPI fake_GetDeviceCaps(HDC hdc, int index)
|
||||
return RC_PALETTE | real_GetDeviceCaps(hdc, index);
|
||||
}
|
||||
|
||||
if (index == SIZEPALETTE || index == NUMCOLORS)
|
||||
if (index == SIZEPALETTE)
|
||||
{
|
||||
return 256;
|
||||
}
|
||||
|
||||
if (index == NUMCOLORS)
|
||||
{
|
||||
if (WindowFromDC(hdc) == GetDesktopWindow())
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 256;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return real_GetDeviceCaps(hdc, index);
|
||||
|
Loading…
x
Reference in New Issue
Block a user