Make GetDeviceCaps16 (hdc, NUMCOLORS) not return -1 for 16 bits programs.

This commit is contained in:
Gerard Patel 2000-09-07 18:37:52 +00:00 committed by Alexandre Julliard
parent 36456e64c2
commit feb87374ba
1 changed files with 4 additions and 1 deletions

View File

@ -790,7 +790,10 @@ HDC WINAPI ResetDCW( HDC hdc, const DEVMODEW *devmode )
*/
INT16 WINAPI GetDeviceCaps16( HDC16 hdc, INT16 cap )
{
return GetDeviceCaps( hdc, cap );
INT16 ret = GetDeviceCaps( hdc, cap );
/* some apps don't expect -1 and think it's a B&W screen */
if ((cap == NUMCOLORS) && (ret == -1)) ret = 2048;
return ret;
}