DXGL r746 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r745‎ | r746 | r747 >
Date:07:55, 12 September 2017
Author:admin
Status:new
Tags:
Comment:
Prevent AddDoubledResolutions from adding duplicate modes.
Modified paths:
  • /ddraw/glDirectDraw.cpp (modified) (history)

Diff [purge]

Index: ddraw/glDirectDraw.cpp
@@ -520,7 +520,10 @@
521521 if(dxglcfg.AddModes && (dxglcfg.scaler != 0)) AddExtraResolutions(&modes,&modenum); // FIXME: Add modes by bitmask
522522 if (dxglcfg.AddModes && (_isnan(dxglcfg.postsizex) || _isnan(dxglcfg.postsizey) ||
523523 (dxglcfg.postsizex < 0.25f) || (dxglcfg.postsizey < 0.25f)))
 524+ {
524525 AddDoubledResolutions(&modes, &modenum);
 526+ DiscardDuplicateModes(&modes, &modenum);
 527+ }
525528 modenum--;
526529 switch(dxglcfg.SortModes)
527530 {