DXGL r502 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r501‎ | r502 | r503 >
Date:13:21, 30 August 2014
Author:admin
Status:new
Tags:
Comment:
Fix GDI color depth of surfaces.
Don't delete DWM8and16BitMitigation AppCompat flag if "Change display color depth" is on.
Modified paths:
  • /cfgmgr/cfgmgr.c (modified) (history)
  • /ddraw/glDirectDrawSurface.cpp (modified) (history)

Diff [purge]

Index: cfgmgr/cfgmgr.c
@@ -647,7 +647,7 @@
648648 if (hUser32) FreeLibrary(hUser32);
649649 }
650650 }
651 - DelCompatFlag(_T("DWM8And16BitMitigation"), initial);
 651+ if(!cfg->colormode) DelCompatFlag(_T("DWM8And16BitMitigation"), initial);
652652 }
653653 void GetGlobalConfig(DXGLCFG *cfg, BOOL initial)
654654 {
Index: ddraw/glDirectDrawSurface.cpp
@@ -193,7 +193,7 @@
194194 bitmapinfo->bmiHeader.biClrImportant = 0;
195195 bitmapinfo->bmiHeader.biClrUsed = 0;
196196 bitmapinfo->bmiHeader.biCompression = BI_RGB;
197 - bitmapinfo->bmiHeader.biBitCount = (WORD)ddInterface->GetBPPMultipleOf8();
 197+ bitmapinfo->bmiHeader.biBitCount = 0;
198198 }
199199 surfacetype=2;
200200 bitmapinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);