Module: wine Branch: master Commit: 7c684cc81ceab2431db3e425645a1d5f0b60dae9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7c684cc81ceab2431db3e42564...
Author: Huw Davies huw@codeweavers.com Date: Tue Feb 25 15:53:10 2014 +0000
wineps: Return 32 even for monochrome printers.
Returning 1 led to CreateCompatibleBitmap producing 1 bpp bitmaps, which is not correct.
---
dlls/wineps.drv/init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/wineps.drv/init.c b/dlls/wineps.drv/init.c index ec98f04..fde65c2 100644 --- a/dlls/wineps.drv/init.c +++ b/dlls/wineps.drv/init.c @@ -503,7 +503,9 @@ static INT PSDRV_GetDeviceCaps( PHYSDEV dev, INT cap ) case DESKTOPVERTRES: return physDev->vertRes; case BITSPIXEL: - return (physDev->pi->ppd->ColorDevice != CD_False) ? 32 : 1; + /* Although Windows returns 1 for monochrome printers, we want + CreateCompatibleBitmap to provide something other than 1 bpp */ + return 32; case PLANES: return 1; case NUMBRUSHES: