From 5aebd86482200ae36b483eafdbe2bbab1d53a000 Mon Sep 17 00:00:00 2001 From: TimeServ Date: Tue, 5 Oct 2004 16:17:40 +0000 Subject: [PATCH] windowed sw fix git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@305 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/sw/vid_dib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engine/sw/vid_dib.c b/engine/sw/vid_dib.c index 2f7324f3f..bda039b70 100644 --- a/engine/sw/vid_dib.c +++ b/engine/sw/vid_dib.c @@ -235,6 +235,7 @@ void DIB_SetPalette( const unsigned char *_pal ) colors[i].rgbReserved = 0; } + /* colors[0].rgbRed = 0; colors[0].rgbGreen = 0; colors[0].rgbBlue = 0; @@ -242,6 +243,7 @@ void DIB_SetPalette( const unsigned char *_pal ) colors[255].rgbRed = 0xff; colors[255].rgbGreen = 0xff; colors[255].rgbBlue = 0xff; + */ if ( SetDIBColorTable( hdcDIBSection, 0, 256, colors ) == 0 ) { @@ -286,6 +288,8 @@ void DIB_SetPalette( const unsigned char *_pal ) pLogPal->palPalEntry[i].peBlue = pal[2]; pLogPal->palPalEntry[i].peFlags = PC_RESERVED | PC_NOCOLLAPSE; } + /* if they're using 8-bpp desktop with 8-bpp renderer keep black/white + constant so windows is partially usable? */ pLogPal->palPalEntry[0].peRed = 0; pLogPal->palPalEntry[0].peGreen = 0; pLogPal->palPalEntry[0].peBlue = 0; @@ -305,8 +309,10 @@ void DIB_SetPalette( const unsigned char *_pal ) Sys_Error( "DIB_SetPalette() - SelectPalette failed(%x)\n",GetLastError() ); } + /* if ( hpalOld == NULL ) hpalOld = hpalOld; + */ if ( ( ret = RealizePalette( hDC ) ) != pLogPal->palNumEntries ) {