From feb87374ba80e9d3f84698d44c18ca0b04f1077a Mon Sep 17 00:00:00 2001 From: Gerard Patel Date: Thu, 7 Sep 2000 18:37:52 +0000 Subject: [PATCH] Make GetDeviceCaps16 (hdc, NUMCOLORS) not return -1 for 16 bits programs. --- objects/dc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/objects/dc.c b/objects/dc.c index 7ed1bf50fcb..c33fb9f8e1f 100644 --- a/objects/dc.c +++ b/objects/dc.c @@ -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; }