DXGL r793 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r792‎ | r793 | r794 >
Date:01:21, 13 March 2018
Author:admin
Status:new
Tags:
Comment:
Add hack to remove TV-compatible refresh rates.
Make both versions of EnumDisplayModes function the same.
Update installer to remove separate DXGL Test.
Temporarily remove color key threshold and post-process shader options from DXGL Config.
Modified paths:
  • /Installer/dxgl.nsi (modified) (history)
  • /cfgmgr/ReadMe.txt (modified) (history)
  • /cfgmgr/cfgmgr.c (modified) (history)
  • /cfgmgr/cfgmgr.h (modified) (history)
  • /ddraw/glDirectDraw.cpp (modified) (history)
  • /dxgl-example.ini (modified) (history)
  • /dxglcfg/dxglcfg.cpp (modified) (history)
  • /dxglcfg/dxglcfg.rc (modified) (history)
  • /dxglcfg/resource.h (modified) (history)

Diff [purge]

Index: Installer/dxgl.nsi
@@ -143,9 +143,9 @@
144144 SectionIn RO
145145 SetOutPath "$INSTDIR"
146146 SetOverwrite ifnewer
147 - File "..\${SRCDIR}\dxgltest.exe"
 147+ Delete "$INSTDIR\dxgltest.exe"
148148 CreateDirectory "$SMPROGRAMS\DXGL"
149 - CreateShortCut "$SMPROGRAMS\DXGL\DXGL Test.lnk" "$INSTDIR\dxgltest.exe"
 149+ Delete "$SMPROGRAMS\DXGL\DXGL Test.lnk"
150150 File "..\${SRCDIR}\dxglcfg.exe"
151151 CreateShortCut "$SMPROGRAMS\DXGL\Configure DXGL.lnk" "$INSTDIR\dxglcfg.exe"
152152 File "..\${SRCDIR}\ddraw.dll"
@@ -193,7 +193,7 @@
194194
195195 Section -PostInstall
196196 ExecWait '"$INSTDIR\dxglcfg.exe" upgrade'
197 - ExecWait '"$INSTDIR\dxgltest.exe" install'
 197+ ExecWait '"$INSTDIR\dxglcfg.exe" profile_install'
198198 SectionEnd
199199
200200 Section "Fix DDraw COM registration" SEC_COMFIX
Index: cfgmgr/ReadMe.txt
@@ -529,6 +529,24 @@
530530 that DXGL will use, unless the actual major version is less than
531531 DebugMaxGLVersionMajor.
532532
 533+Member HackCrop640480to640400
 534+INI Entry HackCrop640480to640400
 535+INI Group hacks
 536+REG_DWORD HKCU\DXGL\Profiles\<app>\HackCrop640480to640400
 537+Crops 640x480 display mode to 640x400.
 538+
 539+Member HackAutoScale512448to640480
 540+INI Entry HackAutoScale512448to640480
 541+INI Group hacks
 542+REG_DWORD HKCU\DXGL\Profiles\<app>\HackAutoScale512448to640480
 543+Expands a 512x448 image to 640x480 if the bordering pixels are black.
 544+
 545+Member HackNoTVRefresh
 546+INI Entry HackNoTVRefresh
 547+INI Group hacks
 548+REG_DWORD HKCU\DXGL\Profiles\<app>\HackNoTVRefresh
 549+Rounds out TV-compatible refresh rates and discards duplicates.
 550+
533551 Member Windows8Detected
534552 Not in INI file
535553 REG_DWORD HKCU\DXGL\Global\Windows8Detected
Index: cfgmgr/cfgmgr.c
@@ -613,7 +613,8 @@
614614 1, _T("FirstScaleY"));
615615 cfg->scalingfilter = ReadDWORD(hKey,cfg->scalingfilter,&cfgmask->scalingfilter,_T("ScalingFilter"));
616616 cfg->BltScale = ReadDWORD(hKey, cfg->BltScale, &cfgmask->BltScale, _T("BltScale"));
617 - cfg->BltThreshold = ReadDWORD(hKey, cfg->BltThreshold, &cfgmask->BltThreshold, _T("BltThreshold"));
 617+ // Removed for DXGL 0.5.13 release
 618+ // cfg->BltThreshold = ReadDWORD(hKey, cfg->BltThreshold, &cfgmask->BltThreshold, _T("BltThreshold"));
618619 cfg->texfilter = ReadDWORD(hKey,cfg->texfilter,&cfgmask->texfilter,_T("TextureFilter"));
619620 cfg->anisotropic = ReadDWORD(hKey,cfg->anisotropic,&cfgmask->anisotropic,_T("AnisotropicFiltering"));
620621 cfg->msaa = ReadDWORD(hKey,cfg->msaa,&cfgmask->msaa,_T("Antialiasing"));
@@ -663,6 +664,7 @@
664665 cfg->DebugMaxGLVersionMinor = ReadDWORD(hKey, cfg->DebugMaxGLVersionMinor, &cfgmask->DebugMaxGLVersionMinor, _T("DebugMaxGLVersionMinor"));
665666 cfg->HackCrop640480to640400 = ReadBool(hKey, cfg->HackCrop640480to640400, &cfgmask->HackCrop640480to640400, _T("HackCrop640480to640400"));
666667 cfg->HackAutoScale512448to640480 = ReadBool(hKey, cfg->HackAutoScale512448to640480, &cfgmask->HackAutoScale512448to640480, _T("HackAutoScale512448to640480"));
 668+ cfg->HackNoTVRefresh = ReadBool(hKey, cfg->HackNoTVRefresh, &cfgmask->HackNoTVRefresh, _T("HackNoTVRefresh"));
667669 if(!global && dll)
668670 {
669671 sizeout = 0;
@@ -762,7 +764,8 @@
763765 1, _T("FirstScaleY"));
764766 WriteDWORD(hKey,cfg->scalingfilter,cfgmask->scalingfilter,_T("ScalingFilter"));
765767 WriteDWORD(hKey, cfg->BltScale, cfgmask->BltScale, _T("BltScale"));
766 - WriteDWORD(hKey, cfg->BltThreshold, cfgmask->BltThreshold, _T("BltThreshold"));
 768+ // Removed for DXGL 0.5.13 release
 769+ // WriteDWORD(hKey, cfg->BltThreshold, cfgmask->BltThreshold, _T("BltThreshold"));
767770 WriteDWORD(hKey,cfg->texfilter,cfgmask->texfilter,_T("TextureFilter"));
768771 WriteDWORD(hKey,cfg->anisotropic,cfgmask->anisotropic,_T("AnisotropicFiltering"));
769772 WriteDWORD(hKey,cfg->msaa,cfgmask->msaa,_T("Antialiasing"));
@@ -811,6 +814,7 @@
812815 WriteDWORD(hKey, cfg->DebugMaxGLVersionMinor, cfgmask->DebugMaxGLVersionMinor, _T("DebugMaxGLVersionMinor"));
813816 WriteBool(hKey, cfg->HackCrop640480to640400, cfgmask->HackCrop640480to640400, _T("HackCrop640480to640400"));
814817 WriteBool(hKey, cfg->HackAutoScale512448to640480, cfgmask->HackAutoScale512448to640480, _T("HackAutoScale512448to640480"));
 818+ WriteBool(hKey, cfg->HackNoTVRefresh, cfgmask->HackNoTVRefresh, _T("HackNoTVRefresh"));
815819 }
816820
817821 TCHAR newregname[MAX_PATH+65];
@@ -910,7 +914,8 @@
911915 cfg->DisplayMultiplierY = 1.0f;
912916 cfg->primaryscalex = 1.0f;
913917 cfg->primaryscaley = 1.0f;
914 - cfg->BltThreshold = 127;
 918+ // Removed for DXGL 0.5.13 release
 919+ // cfg->BltThreshold = 127;
915920 cfg->WindowPosition = 1;
916921 cfg->RememberWindowSize = TRUE;
917922 cfg->RememberWindowPosition = TRUE;
@@ -1017,7 +1022,8 @@
10181023 {
10191024 if (!stricmp(name, "ScalingFilter")) cfg->scalingfilter = INIIntValue(value);
10201025 if (!stricmp(name, "BltScale")) cfg->BltScale = INIIntValue(value);
1021 - if (!stricmp(name, "BltThreshold")) cfg->BltThreshold = INIIntValue(value);
 1026+ // Removed for DXGL 0.5.13 release
 1027+ // if (!stricmp(name, "BltThreshold")) cfg->BltThreshold = INIIntValue(value);
10221028 if (!stricmp(name, "AdjustPrimaryResolution")) cfg->primaryscale = INIIntValue(value);
10231029 if (!stricmp(name, "PrimaryScaleX")) cfg->primaryscalex = INIFloatValue(value);
10241030 if (!stricmp(name, "PrimaryScaleY")) cfg->primaryscaley = INIFloatValue(value);
@@ -1060,7 +1066,7 @@
10611067 if (!stricmp(name, "WindowY")) cfg->WindowY = INIIntValue(value);
10621068 if (!stricmp(name, "WindowWidth")) cfg->WindowWidth = INIIntValue(value);
10631069 if (!stricmp(name, "WindowHeight")) cfg->WindowHeight = INIIntValue(value);
1064 - if (!stricmp(name, "WindowMaximized")) cfg->WindowMaximized = INIIntValue(value);
 1070+ if (!stricmp(name, "WindowMaximized")) cfg->WindowMaximized = INIBoolValue(value);
10651071 }
10661072 if (!stricmp(section, "debug"))
10671073 {
@@ -1080,6 +1086,7 @@
10811087 {
10821088 if (!stricmp(section, "HackCrop640480to640400")) cfg->HackCrop640480to640400 = INIBoolValue(value);
10831089 if (!stricmp(section, "HackAutoScale512448to640480")) cfg->HackAutoScale512448to640480 = INIBoolValue(value);
 1090+ if (!stricmp(section, "HackNoTVRefresh")) cfg->HackNoTVRefresh = INIBoolValue(value);
10841091 }
10851092 return 1;
10861093 }
Index: cfgmgr/cfgmgr.h
@@ -43,7 +43,8 @@
4444 // [scaling]
4545 DWORD scalingfilter;
4646 DWORD BltScale;
47 - DWORD BltThreshold;
 47+ // Removed for DXGL 0.5.13 release
 48+ // DWORD BltThreshold;
4849 DWORD primaryscale;
4950 float primaryscalex;
5051 float primaryscaley;
@@ -91,6 +92,7 @@
9293 // [hacks]
9394 BOOL HackCrop640480to640400;
9495 BOOL HackAutoScale512448to640480;
 96+ BOOL HackNoTVRefresh;
9597 // internal
9698 BOOL Windows8Detected;
9799 BOOL ParsedAddColorDepths;
Index: ddraw/glDirectDraw.cpp
@@ -437,6 +437,26 @@
438438 *count += newcount;
439439 }
440440
 441+void RemoveTVAspectModes(DEVMODE **array, DWORD count)
 442+{
 443+ for (DWORD i = 0; i < count; i++)
 444+ {
 445+ if ((*array)[i].dmDisplayFrequency == 23)
 446+ (*array)[i].dmDisplayFrequency = 24;
 447+ else if ((*array)[i].dmDisplayFrequency == 29)
 448+ (*array)[i].dmDisplayFrequency = 30;
 449+ else if ((*array)[i].dmDisplayFrequency == 47)
 450+ (*array)[i].dmDisplayFrequency = 48;
 451+ else if ((*array)[i].dmDisplayFrequency == 59)
 452+ (*array)[i].dmDisplayFrequency = 60;
 453+ else if ((*array)[i].dmDisplayFrequency == 71)
 454+ (*array)[i].dmDisplayFrequency = 72;
 455+ else if ((*array)[i].dmDisplayFrequency == 119)
 456+ (*array)[i].dmDisplayFrequency = 120;
 457+ }
 458+}
 459+
 460+
441461 void AddExtraColorModes(DEVMODE **array, DWORD *count)
442462 {
443463 DEVMODE *array2 = (DEVMODE *)malloc(sizeof(DEVMODE)*(7*(*count)));
@@ -600,8 +620,7 @@
601621 }
602622 }
603623 DiscardDuplicateModes(&modes,&modenum);
604 - if(dxglcfg.AddColorDepths) AddExtraColorModes(&modes,&modenum); // FIXME: Add color depths by bitmask
605 - DiscardDuplicateModes(&modes,&modenum);
 624+ if(dxglcfg.AddColorDepths) AddExtraColorModes(&modes,&modenum);
606625 if (dxglcfg.scaler != 0)
607626 {
608627 if (dxglcfg.AddModes & 1) //Common low resolutions and doubled modes
@@ -622,12 +641,10 @@
623642 if (dxglcfg.AddModes && (_isnan(dxglcfg.postsizex) || _isnan(dxglcfg.postsizey) ||
624643 (dxglcfg.postsizex < 0.25f) || (dxglcfg.postsizey < 0.25f)))
625644 {
626 - if (dxglcfg.AddModes & 1)
627 - {
628 - AddDoubledResolutions(&modes, &modenum);
629 - DiscardDuplicateModes(&modes, &modenum);
630 - }
 645+ if (dxglcfg.AddModes & 1) AddDoubledResolutions(&modes, &modenum);
631646 }
 647+ if (dxglcfg.HackNoTVRefresh) RemoveTVAspectModes(&modes, modenum);
 648+ DiscardDuplicateModes(&modes, &modenum);
632649 modenum--;
633650 switch(dxglcfg.SortModes)
634651 {
@@ -707,7 +724,8 @@
708725 }
709726 HRESULT EnumDisplayModes2(DWORD dwFlags, LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK2 lpEnumModesCallback)
710727 {
711 - bool match;
 728+ BOOL match;
 729+ BOOL scalemodes;
712730 DWORD modenum = 0;
713731 DWORD modemax = 128;
714732 DEVMODE mode;
@@ -720,8 +738,20 @@
721739 ZeroMemory(&ddmode,sizeof(DDSURFACEDESC2));
722740 ddmode.dwSize = sizeof(DDSURFACEDESC2);
723741 ddmode.dwFlags = DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH | DDSD_PIXELFORMAT | DDSD_REFRESHRATE;
 742+ if (!_isnan(dxglcfg.postsizex) && !_isnan(dxglcfg.postsizey) &&
 743+ (dxglcfg.postsizex > 0.25f) && (dxglcfg.postsizey > 0.25f) &&
 744+ (dxglcfg.postsizex != 1.0f) && (dxglcfg.postsizey != 1.0f) &&
 745+ ((dxglcfg.scaler == 0) || ((dxglcfg.scaler >= 4) && (dxglcfg.scaler <= 6))) &&
 746+ (!dxglcfg.primaryscale))
 747+ scalemodes = TRUE;
 748+ else scalemodes = FALSE;
724749 while(EnumDisplaySettings(NULL,modenum++,&mode))
725750 {
 751+ if (scalemodes)
 752+ {
 753+ mode.dmPelsWidth /= dxglcfg.postsizex;
 754+ mode.dmPelsHeight /= dxglcfg.postsizey;
 755+ }
726756 modes[modenum-1] = mode;
727757 if(modenum >= modemax)
728758 {
@@ -736,7 +766,7 @@
737767 }
738768 }
739769 DiscardDuplicateModes(&modes,&modenum);
740 - if(dxglcfg.AddColorDepths) AddExtraColorModes(&modes,&modenum); // FIXME: Add color depths by bitmask
 770+ if(dxglcfg.AddColorDepths) AddExtraColorModes(&modes,&modenum);
741771 if (dxglcfg.scaler != 0)
742772 {
743773 if (dxglcfg.AddModes & 1) //Common low resolutions and doubled modes
@@ -757,12 +787,10 @@
758788 if (dxglcfg.AddModes && (_isnan(dxglcfg.postsizex) || _isnan(dxglcfg.postsizey) ||
759789 (dxglcfg.postsizex < 0.25f) || (dxglcfg.postsizey < 0.25f)))
760790 {
761 - if (dxglcfg.AddModes & 1)
762 - {
763 - AddDoubledResolutions(&modes, &modenum);
764 - DiscardDuplicateModes(&modes, &modenum);
765 - }
 791+ if (dxglcfg.AddModes & 1) AddDoubledResolutions(&modes, &modenum);
766792 }
 793+ if (dxglcfg.HackNoTVRefresh) RemoveTVAspectModes(&modes, modenum);
 794+ DiscardDuplicateModes(&modes, &modenum);
767795 modenum--;
768796 switch(dxglcfg.SortModes)
769797 {
Index: dxgl-example.ini
@@ -596,3 +596,11 @@
597597 ; black bars in 640x480 mode.
598598 ; Default is false
599599 HackAutoScale512448to640480 = false
 600+
 601+; HackNoTVRefresh - Boolean
 602+; Removes TV-compatible refresh rates that may be added by Windows 7 and
 603+; above. If a rounded refresh rate is not available it will be added.
 604+; This may fix some games that may run at a reduced framerate due to these
 605+; compatible refresh rates operating above the integer refresh rate.
 606+; Default is false
 607+HackNoTVRefresh = false
Index: dxglcfg/dxglcfg.cpp
@@ -1831,7 +1831,8 @@
18321832 SetFloat3place(hWnd, IDC_CUSTOMSCALEY, cfg->primaryscaley, cfgmask->primaryscaley);
18331833 }
18341834 break;
1835 - case IDC_BLTTHRESHOLD:
 1835+ // Removed for DXGL 0.5.13 release
 1836+ /*case IDC_BLTTHRESHOLD:
18361837 if (HIWORD(wParam) == EN_CHANGE)
18371838 {
18381839 if (!EditInterlock)
@@ -1847,7 +1848,7 @@
18481849 {
18491850 SetInteger(hWnd, IDC_BLTTHRESHOLD, cfg->BltThreshold, cfgmask->BltThreshold);
18501851 }
1851 - break;
 1852+ break;*/
18521853 case IDC_SHADER:
18531854 if (HIWORD(wParam) == EN_CHANGE)
18541855 {
@@ -1864,7 +1865,8 @@
18651866 default:
18661867 break;
18671868 }
1868 - case WM_HSCROLL:
 1869+ // Removed for DXGL 0.5.13 release
 1870+ /* case WM_HSCROLL:
18691871 switch (LOWORD(wParam))
18701872 {
18711873 case TB_ENDTRACK:
@@ -1885,7 +1887,7 @@
18861888 default:
18871889 break;
18881890 }
1889 - break;
 1891+ break;*/
18901892 default:
18911893 return FALSE;
18921894 }
@@ -2282,6 +2284,10 @@
22832285 *value = cfg->HackAutoScale512448to640480;
22842286 *mask = cfgmask->HackAutoScale512448to640480;
22852287 break;
 2288+ case 2:
 2289+ *value = cfg->HackNoTVRefresh;
 2290+ *mask = cfgmask->HackNoTVRefresh;
 2291+ break;
22862292 default:
22872293 *value = FALSE;
22882294 *mask = FALSE;
@@ -2301,6 +2307,9 @@
23022308 cfg->HackAutoScale512448to640480 = value;
23032309 cfgmask->HackAutoScale512448to640480 = mask;
23042310 break;
 2311+ case 2:
 2312+ cfg->HackNoTVRefresh = value;
 2313+ cfgmask->HackNoTVRefresh = mask;
23052314 default:
23062315 break;
23072316 }
@@ -2778,11 +2787,12 @@
27792788 _tcscpy(buffer, _T("Bilinear, soft colorkey"));
27802789 SendDlgItemMessage(hTabs[1], IDC_BLTFILTER, CB_ADDSTRING, 4, (LPARAM)buffer);
27812790 SendDlgItemMessage(hTabs[1], IDC_BLTFILTER, CB_SETCURSEL, cfg->BltScale, 0);
 2791+ // Removed for DXGL 0.5.13 release
27822792 // Blt scaling threshold
2783 - SendDlgItemMessage(hTabs[1], IDC_BLTTHRESHOLDSLIDER, TBM_SETRANGE, 0, 0xFE0000);
2784 - SendDlgItemMessage(hTabs[1], IDC_BLTTHRESHOLDSLIDER, TBM_SETPOS, TRUE, cfg->BltThreshold);
2785 - SendDlgItemMessage(hTabs[1], IDC_BLTTHRESHOLD, EM_SETLIMITTEXT, 3, 0);
2786 - SetInteger(hTabs[1], IDC_BLTTHRESHOLD, cfg->BltThreshold, cfgmask->BltThreshold);
 2793+ // SendDlgItemMessage(hTabs[1], IDC_BLTTHRESHOLDSLIDER, TBM_SETRANGE, 0, 0xFE0000);
 2794+ // SendDlgItemMessage(hTabs[1], IDC_BLTTHRESHOLDSLIDER, TBM_SETPOS, TRUE, cfg->BltThreshold);
 2795+ // SendDlgItemMessage(hTabs[1], IDC_BLTTHRESHOLD, EM_SETLIMITTEXT, 3, 0);
 2796+ // SetInteger(hTabs[1], IDC_BLTTHRESHOLD, cfg->BltThreshold, cfgmask->BltThreshold);
27872797 // aspect
27882798 _tcscpy(buffer,_T("Default"));
27892799 SendDlgItemMessage(hTabs[0], IDC_ASPECT, CB_ADDSTRING, 0, (LPARAM)buffer);
@@ -3068,6 +3078,8 @@
30693079 SendDlgItemMessage(hTabs[5], IDC_HACKSLIST, LB_ADDSTRING, 0, (LPARAM)buffer);
30703080 _tcscpy(buffer, _T("Expand 512x448 to 640x480 when border is blank"));
30713081 SendDlgItemMessage(hTabs[5], IDC_HACKSLIST, LB_ADDSTRING, 0, (LPARAM)buffer);
 3082+ _tcscpy(buffer, _T("Remove TV-compatible refresh rates"));
 3083+ SendDlgItemMessage(hTabs[5], IDC_HACKSLIST, LB_ADDSTRING, 0, (LPARAM)buffer);
30723084 // About text
30733085 _tcscpy(abouttext, _T("DXGL\r\nVersion "));
30743086 _tcscat(abouttext, _T(DXGLVERSTRING));
@@ -3531,12 +3543,13 @@
35323544 SetFloat3place(hTabs[1], IDC_CUSTOMSCALEY, cfg->primaryscaley, cfgmask->primaryscaley);
35333545 SetText(hTabs[1], IDC_SHADER, cfg->shaderfile, cfgmask->shaderfile, tristate);
35343546 SetCombo(hTabs[1], IDC_BLTFILTER, cfg->BltScale, cfgmask->BltScale, tristate);
3535 - SetInteger(hTabs[1], IDC_BLTTHRESHOLD, cfg->BltThreshold, cfgmask->BltThreshold);
 3547+ // Removed for DXGL 0.5.13 release
 3548+ /* SetInteger(hTabs[1], IDC_BLTTHRESHOLD, cfg->BltThreshold, cfgmask->BltThreshold);
35363549 if (cfgmask->BltThreshold)
35373550 {
35383551 SendDlgItemMessage(hTabs[1], IDC_BLTTHRESHOLDSLIDER, TBM_SETPOS, TRUE, cfg->BltThreshold);
35393552 }
3540 - else SendDlgItemMessage(hTabs[1], IDC_BLTTHRESHOLDSLIDER, TBM_SETPOS, TRUE, 127);
 3553+ else SendDlgItemMessage(hTabs[1], IDC_BLTTHRESHOLDSLIDER, TBM_SETPOS, TRUE, 127);*/
35413554 // 3D tab
35423555 SetCombo(hTabs[2], IDC_TEXFILTER, cfg->texfilter, cfgmask->texfilter, tristate);
35433556 SetCombo(hTabs[2], IDC_ANISO, cfg->anisotropic, cfgmask->anisotropic, tristate);
@@ -4027,7 +4040,7 @@
40284041 // FIXME: Remove DXGL Config profile
40294042 LPDIRECTDRAW lpdd;
40304043 DirectDrawCreate(NULL, &lpdd, NULL);
4031 - lpdd->Release();
 4044+ IDirectDraw_Release(lpdd);
40324045 return 0;
40334046 }
40344047 icc.dwSize = sizeof(icc);
Index: dxglcfg/dxglcfg.rc
@@ -97,9 +97,9 @@
9898 COMBOBOX IDC_MSAA, 7, 43, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
9999 LTEXT "Renderer aspect ratio", IDC_STATIC, 114, 32, 71, 8, SS_LEFT, WS_EX_LEFT
100100 COMBOBOX IDC_ASPECT3D, 114, 43, 102, 14, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
101 - LTEXT "Low color rendering", 0, 7, 58, 63, 9, SS_LEFT, WS_EX_LEFT
 101+ LTEXT "Low color rendering", IDC_STATIC, 7, 58, 63, 9, SS_LEFT, WS_EX_LEFT
102102 COMBOBOX IDC_LOWCOLORRENDER, 7, 68, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
103 - LTEXT "Enable dithering", 0, 114, 58, 52, 9, SS_LEFT, WS_EX_LEFT
 103+ LTEXT "Enable dithering", IDC_STATIC, 114, 58, 52, 9, SS_LEFT, WS_EX_LEFT
104104 COMBOBOX IDC_DITHERING, 114, 68, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
105105 }
106106
@@ -142,10 +142,10 @@
143143 STYLE DS_3DLOOK | DS_CENTER | DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW
144144 FONT 8, "Ms Shell Dlg"
145145 {
146 - LTEXT "Changing these options may affect the functionality of DXGL and should only be done if necessary.", 0, 7, 5, 320, 9, SS_LEFT, WS_EX_LEFT
 146+ LTEXT "Changing these options may affect the functionality of DXGL and should only be done if necessary.", IDC_STATIC, 7, 5, 320, 9, SS_LEFT, WS_EX_LEFT
147147 LISTBOX IDC_DEBUGLIST, 7, 16, 269, 130, WS_TABSTOP | WS_VSCROLL | LBS_NOINTEGRALHEIGHT |
148148 LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOTIFY, WS_EX_LEFT
149 - LTEXT "Maximum OpenGL Version", 0, 8, 153, 86, 9, SS_LEFT, WS_EX_LEFT
 149+ LTEXT "Maximum OpenGL Version", IDC_STATIC, 8, 153, 86, 9, SS_LEFT, WS_EX_LEFT
150150 COMBOBOX IDC_GLVERSION, 96, 151, 101, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
151151 }
152152
@@ -156,7 +156,7 @@
157157 STYLE DS_3DLOOK | DS_CENTER | DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW
158158 FONT 8, "Ms Shell Dlg"
159159 {
160 - LTEXT "These options should be set only for specific programs; use with other programs may cause malfuncion.", 0, 7, 5, 332, 9, SS_LEFT, WS_EX_LEFT
 160+ LTEXT "These options should be set only for specific programs; use with other programs may cause malfuncion.", IDC_STATIC, 7, 5, 332, 9, SS_LEFT, WS_EX_LEFT
161161 LISTBOX IDC_HACKSLIST, 7, 16, 269, 148, WS_TABSTOP | WS_VSCROLL | LBS_NOINTEGRALHEIGHT |
162162 LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOTIFY, WS_EX_LEFT
163163 }
@@ -220,21 +220,23 @@
221221 COMBOBOX IDC_POSTSCALE, 7, 17, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
222222 LTEXT "Postprocess input multiplier", IDC_STATIC, 114, 7, 90, 9, SS_LEFT, WS_EX_LEFT
223223 COMBOBOX IDC_POSTSCALESIZE, 114, 17, 102, 30, CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
224 - AUTOCHECKBOX "Use post-processing shader", IDC_USESHADER, 7, 33, 103, 8, WS_DISABLED, WS_EX_LEFT
225 - COMBOBOX IDC_SHADER, 7, 43, 247, 92, WS_DISABLED | CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
226 - PUSHBUTTON "...", IDC_BROWSESHADER, 256, 42, 20, 14, WS_DISABLED, WS_EX_LEFT
227 - LTEXT "Primary buffer scaling", IDC_STATIC, 7, 58, 70, 8, SS_LEFT, WS_EX_LEFT
228 - COMBOBOX IDC_PRIMARYSCALE, 7, 68, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
229 - LTEXT "Blt Scaling Filter", IDC_STATIC, 114, 58, 52, 8, SS_LEFT, WS_EX_LEFT
230 - COMBOBOX IDC_BLTFILTER, 114, 68, 102, 92, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
231 - LTEXT "Blt Color Key Threshold", 0, 114, 83, 76, 9, SS_LEFT, WS_EX_LEFT
232 - LTEXT "Custom scale", IDC_CUSTOMSCALELABEL, 7, 83, 44, 8, WS_DISABLED | SS_LEFT, WS_EX_LEFT
233 - LTEXT "X", IDC_CUSTOMSCALELABELX, 7, 97, 8, 8, WS_DISABLED | SS_LEFT, WS_EX_LEFT
234 - EDITTEXT IDC_CUSTOMSCALEX, 15, 94, 40, 14, WS_DISABLED | ES_AUTOHSCROLL, WS_EX_LEFT
235 - LTEXT "Y", IDC_CUSTOMSCALELABELY, 57, 97, 8, 8, WS_DISABLED | SS_LEFT, WS_EX_LEFT
236 - EDITTEXT IDC_CUSTOMSCALEY, 65, 94, 40, 14, WS_DISABLED | ES_AUTOHSCROLL, WS_EX_LEFT
237 - CONTROL "", IDC_BLTTHRESHOLDSLIDER, TRACKBAR_CLASS, WS_TABSTOP | TBS_BOTH | TBS_NOTICKS, 114, 93, 79, 15, WS_EX_LEFT
238 - EDITTEXT IDC_BLTTHRESHOLD, 195, 94, 21, 14, ES_AUTOHSCROLL | ES_NUMBER, WS_EX_LEFT
 224+ // AUTOCHECKBOX "Use post-processing shader", IDC_USESHADER, 7, 33, 103, 8, WS_DISABLED, WS_EX_LEFT
 225+ // COMBOBOX IDC_SHADER, 7, 43, 247, 92, WS_DISABLED | CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
 226+ // PUSHBUTTON "...", IDC_BROWSESHADER, 256, 42, 20, 14, WS_DISABLED, WS_EX_LEFT
 227+ // Move the following controls down by 25 after re-adding the Post-Process shader
 228+ LTEXT "Primary buffer scaling", IDC_STATIC, 7, 33, 70, 8, SS_LEFT, WS_EX_LEFT
 229+ COMBOBOX IDC_PRIMARYSCALE, 7, 43, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 230+ LTEXT "Blt Scaling Filter", IDC_STATIC, 114, 33, 52, 8, SS_LEFT, WS_EX_LEFT
 231+ COMBOBOX IDC_BLTFILTER, 114, 43, 102, 92, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 232+ LTEXT "Custom scale", IDC_CUSTOMSCALELABEL, 7, 58, 44, 8, WS_DISABLED | SS_LEFT, WS_EX_LEFT
 233+ LTEXT "X", IDC_CUSTOMSCALELABELX, 7, 72, 8, 8, WS_DISABLED | SS_LEFT, WS_EX_LEFT
 234+ EDITTEXT IDC_CUSTOMSCALEX, 15, 69, 40, 14, WS_DISABLED | ES_AUTOHSCROLL, WS_EX_LEFT
 235+ LTEXT "Y", IDC_CUSTOMSCALELABELY, 57, 72, 8, 8, WS_DISABLED | SS_LEFT, WS_EX_LEFT
 236+ EDITTEXT IDC_CUSTOMSCALEY, 65, 69, 40, 14, WS_DISABLED | ES_AUTOHSCROLL, WS_EX_LEFT
 237+ // Removed for DXGL 0.5.13 release
 238+ // LTEXT "Blt Color Key Threshold", 0, 114, 83, 76, 9, SS_LEFT, WS_EX_LEFT
 239+ // CONTROL "", IDC_BLTTHRESHOLDSLIDER, TRACKBAR_CLASS, WS_TABSTOP | TBS_BOTH | TBS_NOTICKS, 114, 93, 79, 15, WS_EX_LEFT
 240+ // EDITTEXT IDC_BLTTHRESHOLD, 195, 94, 21, 14, ES_AUTOHSCROLL | ES_NUMBER, WS_EX_LEFT
239241 }
240242
241243
Index: dxglcfg/resource.h
@@ -90,8 +90,9 @@
9191 #define IDC_CUSTOMSCALEX 2110
9292 #define IDC_CUSTOMSCALELABELY 2111
9393 #define IDC_CUSTOMSCALEY 2112
94 -#define IDC_BLTTHRESHOLDSLIDER 2113
95 -#define IDC_BLTTHRESHOLD 2114
 94+// Removed for DXGL 0.5.13 release
 95+// #define IDC_BLTTHRESHOLDSLIDER 2113
 96+// #define IDC_BLTTHRESHOLD 2114
9697
9798 // Controls - 3D Graphics Tab
9899 #define IDC_TEXFILTER 2201