DXGL r700 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r699‎ | r700 | r701 >
Date:22:33, 14 March 2017
Author:admin
Status:new
Tags:
Comment:
Update help file.
Minor tweaks to DXGL Config.
Modified paths:
  • /Help/configuration.htm (modified) (history)
  • /Help/dxglcfg.png (modified) (history)
  • /dxglcfg/dxglcfg.c (modified) (history)
  • /dxglcfg/dxglcfg.rc (modified) (history)
  • /dxglcfg2/dxglcfg2.c (modified) (history)
  • /dxglcfg2/dxglcfg2.rc (modified) (history)

Diff [purge]

Index: Help/configuration.htm
@@ -7,19 +7,21 @@
88 <body>
99 <img src="dxglcfg.png" alt="DXGL Config" usemap="#cfgmap" class="noborder" />
1010 <map name="cfgmap">
11 - <area shape="rect" coords="9,31,281,389" alt="Applications" href="#applist" />
12 - <area shape="rect" coords="9,393,144,416" alt="Add..." href="#add" />
13 - <area shape="rect" coords="147,393,282,416" alt="Remove" href="#remove" />
 11+ <area shape="rect" coords="9,31,281,383" alt="Applications" href="#applist" />
 12+ <area shape="rect" coords="9,386,144,409" alt="Add..." href="#add" />
 13+ <area shape="rect" coords="147,386,282,409" alt="Remove" href="#remove" />
1414 <area shape="rect" coords="296,47,449,82" alt="Video mode" href="#vidmode" />
1515 <area shape="rect" coords="296,87,449,123" alt="Sort video modes" href="#sortmodes" />
16 - <area shape="rect" coords="452,46,564,59" alt="Change color depth" href="#changedepth" />
17 - <area shape="rect" coords="452,68,588,81" alt="Adjust primary resolution" href="#adjustprimary" />
18 - <area shape="rect" coords="452,90,588,103" alt="Add Extra Display Modes" href="#extramodes" />
19 - <area shape="rect" coords="452,111,586,124" alt="Support All Color Depths" href="#alldepths" />
20 - <area shape="rect" coords="296,136,448,170" alt="Scaling method" href="#scaler" />
21 - <area shape="rect" coords="296,233,448,253" alt="Screen aspect ratio" href="#aspect" />
22 - <area shape="rect" coords="452,233,601,253" alt="DPI scaling mode" href="#dpiscale" />
23 - <area shape="rect" coords="452,150,601,170" alt="Fullscreen window mode" href="#fullmode" />
 16+ <area shape="rect" coords="452,46,599,59" alt="Change display color depth" href="#changedepth" />
 17+ <area shape="rect" coords="452,66,589,79" alt="Adjust primary resolution" href="#adjustprimary" />
 18+ <area shape="rect" coords="452,87,587,100" alt="Add Extra Display Modes" href="#extramodes" />
 19+ <area shape="rect" coords="452,108,582,121" alt="Support All Color Depths" href="#alldepths" />
 20+ <area shape="rect" coords="296,130,449,167" alt="Scaling method (first pass)" href="#scalerfirst" />
 21+ <area shape="rect" coords="452,130,602,167" alt="1st pass scale size" href="#scalerfirstsize" />
 22+ <area shape="rect" coords="296,170,449,207" alt="Scaling method (final pass)" href="#scalerfinal" />
 23+ <area shape="rect" coords="296,210,449,248" alt="Screen aspect ratio" href="#aspect" />
 24+ <area shape="rect" coords="452,210,602,248" alt="DPI scaling mode" href="#dpiscale" />
 25+ <area shape="rect" coords="452,170,602,207" alt="Fullscreen window mode" href="#fullmode" />
2426 </map>
2527 <h1>Configuration</h1>
2628 Configuration for DXGL can be accessed by opening the &quot;DXGL Config&quot; program in the DXGL program group. Configuration is as follows:
@@ -67,18 +69,28 @@
6870 If checked, adds additional, mostly low resolution, display modes to the list generated by IDirectDraw::EnumDisplayModes. Only works if
6971 &quot;Video mode&quot; is not set to &quot;Change desktop resolution.&quot;
7072 <h2><a name="alldepths" />Support All Color Depths</h2>
71 - If checked, adds 8, 15, 16, 24, and 32-bit color modes if not listed by the system. Under Windows 8 or above, this will be enabled by default.
72 - <h2><a name="scaler" />Scaling method</h2>
73 - Selects the filter to use for scaling the output when the resolution is different than the desktop resolution,
 73+ If checked, adds 8, 16, 24, and 32-bit color modes if not listed by the system. Under Windows 8 or above, this will be enabled by default.
 74+ <h2><a name="scalerfirst" />Scaling method (1st pass)</h2>
 75+ Scaling method for an optional image scaling pass. This can be used to create a pixelated effect while still preserving the ability to have filtered display scaling.
 76+ The following methods are available:
 77+ <h3>Nearest</h3>
 78+ Uses nearest-neighbor scaling.
 79+ <h3>Bilinear</h3>
 80+ Uses bilinear scaling. 8-bit display modes will always use nearest scaling for this pass.
 81+ <h2><a name="scalerfirstsize" />1st pass scale size</h2>
 82+ Selects the amount to scale the display on the first pass. There is an Auto preset as well as presets for fixed 1x, 2x1, 2x, 3x, and 4x ratios. In addition, a ratio can manually be set anywhere from 0.25x0.25 to 16x16. The Auto preset will automatically double pixels horizontally if the horizontal resolution is 400 pixels or less, and will double pixels vertically if the vertical resolution is 300 or less.
 83+ In addition, if Video mode is set to Change desktop resolution and Add extra display modes is enabled, a subset of low resolution pixel doubled modes will be added.
 84+ <h2><a name="scalerfinal" />Scaling method (final pass)</h2>
 85+ Selects the filter to use for scaling the output when the resolution is different than the desktop resolution, or when the optional 1st pass scaling is in effect, the scaled resolution is different from the desktop resolution,
7486 as well as for blitting operations. The following methods are available:
7587 <h3>Nearest</h3>
7688 Uses nearest-neighbor scaling.
7789 <h3>Bilinear</h3>
78 - Uses bilinear scaling. Reduces jagged edges, but may create visual artifacts in some applications. Does not work with 8-bit color except for the full-screen scaling modes.
 90+ Uses bilinear scaling. Reduces jagged edges, but may create visual artifacts in some applications. Does not work with 8-bit color except for the full-screen scaling modes. Blitting operations are always nearest mode in 8-bit.
7991 <h2><a name="aspect" />Screen aspect ratio</h2>
8092 Overrides the aspect ratio for "Aspect corrected stretch" and "Scale if mode not found". Enter as x:y or as a floating point ratio, for example 4:3 or 1.333333, or select a preset from the dropdown list. Default uses a square pixel ratio.
8193 <h2><a name="dpiscale" />DPI scaling mode</h2>
82 - Fixes errors caused by Windows High DPI scaling in Windows Vista and greater.
 94+ Fixes errors caused by Windows High DPI scaling in Windows Vista and greater. This option is always set to Enabled on older operating systems, as these operating systems apply high DPI modes to all applications.
8395 <h3>Disabled</h3>
8496 Disables the DPI scaling fix, unless specified by the program.
8597 <h3>Enabled</h3>
Index: Help/dxglcfg.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: dxglcfg/dxglcfg.c
@@ -588,7 +588,7 @@
589589 SendDlgItemMessage(hWnd, IDC_PRESCALESIZE, CB_ADDSTRING, 0, (LPARAM)buffer);
590590 _tcscpy(buffer, _T("1x"));
591591 SendDlgItemMessage(hWnd, IDC_PRESCALESIZE, CB_ADDSTRING, 0, (LPARAM)buffer);
592 - _tcscpy(buffer, _T("1x2"));
 592+ _tcscpy(buffer, _T("2x1"));
593593 SendDlgItemMessage(hWnd, IDC_PRESCALESIZE, CB_ADDSTRING, 0, (LPARAM)buffer);
594594 _tcscpy(buffer, _T("2x"));
595595 SendDlgItemMessage(hWnd, IDC_PRESCALESIZE, CB_ADDSTRING, 0, (LPARAM)buffer);
Index: dxglcfg/dxglcfg.rc
@@ -28,7 +28,7 @@
2929 // Dialog resources
3030 //
3131 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
32 -IDD_DXGLCFG DIALOG 0, 0, 405, 265
 32+IDD_DXGLCFG DIALOG 0, 0, 405, 261
3333 STYLE DS_3DLOOK | DS_CONTEXTHELP | DS_SETFONT | WS_CAPTION | WS_SYSMENU
3434 CAPTION "DXGL Config"
3535 FONT 8, "Ms Shell Dlg 2"
@@ -41,39 +41,39 @@
4242 LTEXT "Applications", IDC_STATIC, 4, 4, 39, 8, SS_LEFT, WS_EX_LEFT
4343 PUSHBUTTON "A&dd...", IDC_ADD, 4, 224, 90, 14, 0, WS_EX_LEFT
4444 PUSHBUTTON "&Remove", IDC_REMOVE, 96, 224, 90, 14, WS_DISABLED, WS_EX_LEFT
45 - GROUPBOX "Graphics", IDC_STATIC, 190, 4, 211, 234, 0, WS_EX_LEFT
 45+ GROUPBOX "Graphics settings", IDC_STATIC, 190, 4, 211, 234, 0, WS_EX_LEFT
4646 LTEXT "Video mode", IDC_STATIC, 195, 14, 38, 8, SS_LEFT, WS_EX_LEFT
4747 COMBOBOX IDC_VIDMODE, 195, 24, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
4848 AUTOCHECKBOX "Change display color depth", IDC_COLOR, 299, 14, 100, 10, 0, WS_EX_LEFT
49 - LTEXT "Scaling method (final pass)", IDC_STATIC, 196, 90, 86, 9, SS_LEFT, WS_EX_LEFT
50 - COMBOBOX IDC_SCALE, 196, 101, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 49+ LTEXT "Scaling method (final pass)", IDC_STATIC, 195, 90, 86, 9, SS_LEFT, WS_EX_LEFT
 50+ COMBOBOX IDC_SCALE, 195, 101, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
5151 LTEXT "Fullscreen window mode", IDC_STATIC, 299, 90, 78, 8, SS_LEFT, WS_EX_LEFT
5252 COMBOBOX IDC_FULLMODE, 299, 101, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
53 - LTEXT "Scaling method (1st pass)", IDC_STATIC, 196, 64, 83, 9, SS_LEFT, WS_EX_LEFT
54 - COMBOBOX IDC_PRESCALE, 196, 75, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 53+ LTEXT "Scaling method (1st pass)", IDC_STATIC, 195, 64, 83, 9, SS_LEFT, WS_EX_LEFT
 54+ COMBOBOX IDC_PRESCALE, 195, 75, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
5555 COMBOBOX IDC_PRESCALESIZE, 299, 75, 100, 30, CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
56 - LTEXT "1st Pass Scale size", 0, 299, 64, 60, 9, SS_LEFT, WS_EX_LEFT
57 - LTEXT "Screen aspect ratio", IDC_STATIC, 196, 116, 63, 8, SS_LEFT, WS_EX_LEFT
 56+ LTEXT "1st pass scale size", 0, 299, 64, 60, 9, SS_LEFT, WS_EX_LEFT
 57+ LTEXT "Screen aspect ratio", IDC_STATIC, 195, 116, 63, 8, SS_LEFT, WS_EX_LEFT
5858 LTEXT "Windows DPI scaling mode", IDC_STATIC, 299, 116, 86, 9, SS_LEFT, WS_EX_LEFT
59 - COMBOBOX IDC_ASPECT, 196, 126, 102, 30, CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
 59+ COMBOBOX IDC_ASPECT, 195, 126, 102, 30, CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
6060 COMBOBOX IDC_DPISCALE, 299, 126, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
61 - LTEXT "Texture filter", IDC_STATIC, 196, 141, 43, 8, SS_LEFT, WS_EX_LEFT
62 - COMBOBOX IDC_TEXFILTER, 196, 151, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 61+ LTEXT "Texture filter", IDC_STATIC, 195, 141, 43, 8, SS_LEFT, WS_EX_LEFT
 62+ COMBOBOX IDC_TEXFILTER, 195, 151, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
6363 LTEXT "Anisotropic filtering", IDC_STATIC, 299, 141, 62, 8, SS_LEFT, WS_EX_LEFT
6464 COMBOBOX IDC_ANISO, 299, 151, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
65 - LTEXT "Antialiasing (MSAA)", IDC_STATIC, 196, 166, 63, 8, SS_LEFT, WS_EX_LEFT
66 - COMBOBOX IDC_MSAA, 196, 176, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
67 - LTEXT "Renderer aspect ratio", IDC_STATIC, 299, 166, 71, 8, SS_LEFT, WS_EX_LEFT
 65+ LTEXT "Antialiasing (MSAA)", IDC_STATIC, 195, 166, 63, 8, SS_LEFT, WS_EX_LEFT
 66+ COMBOBOX IDC_MSAA, 195, 176, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 67+ LTEXT "3D renderer aspect ratio", IDC_STATIC, 299, 166, 80, 8, SS_LEFT, WS_EX_LEFT
6868 COMBOBOX IDC_ASPECT3D, 299, 176, 100, 14, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
6969 AUTOCHECKBOX "Adjust primary resolution", IDC_HIGHRES, 299, 27, 96, 8, 0, WS_EX_LEFT
7070 AUTOCHECKBOX "Support all color depths", IDC_UNCOMMONCOLOR, 299, 53, 91, 8, 0, WS_EX_LEFT
7171 AUTOCHECKBOX "Add extra display modes", IDC_EXTRAMODES, 299, 40, 95, 8, 0, WS_EX_LEFT
7272 LTEXT "Sort video modes", IDC_STATIC, 195, 39, 56, 8, SS_LEFT, WS_EX_LEFT
73 - COMBOBOX IDC_SORTMODES, 195, 49, 101, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
74 - LTEXT "Texture format", IDC_STATIC, 196, 191, 50, 8, SS_LEFT, WS_EX_LEFT
75 - COMBOBOX IDC_TEXTUREFORMAT, 196, 201, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
76 - LTEXT "Texture access method", IDC_STATIC, 301, 191, 76, 8, SS_LEFT, WS_EX_LEFT
77 - COMBOBOX IDC_TEXUPLOAD, 300, 201, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 73+ COMBOBOX IDC_SORTMODES, 195, 49, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 74+ LTEXT "Texture format", IDC_STATIC, 195, 191, 50, 8, SS_LEFT, WS_EX_LEFT
 75+ COMBOBOX IDC_TEXTUREFORMAT, 195, 201, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 76+ LTEXT "Texture access method", IDC_STATIC, 299, 191, 76, 8, SS_LEFT, WS_EX_LEFT
 77+ COMBOBOX IDC_TEXUPLOAD, 299, 201, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
7878 EDITTEXT IDC_PROFILEPATH, 215, 223, 184, 14, NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY, WS_EX_LEFT
7979 LTEXT "Path:", IDC_PATHLABEL, 196, 223, 18, 9, SS_LEFT, WS_EX_LEFT
8080 }
Index: dxglcfg2/dxglcfg2.c
@@ -820,7 +820,7 @@
821821 SendDlgItemMessage(hTabs[0], IDC_PRESCALESIZE, CB_ADDSTRING, 0, (LPARAM)buffer);
822822 _tcscpy(buffer, _T("1x"));
823823 SendDlgItemMessage(hTabs[0], IDC_PRESCALESIZE, CB_ADDSTRING, 0, (LPARAM)buffer);
824 - _tcscpy(buffer, _T("1x2"));
 824+ _tcscpy(buffer, _T("2x1"));
825825 SendDlgItemMessage(hTabs[0], IDC_PRESCALESIZE, CB_ADDSTRING, 0, (LPARAM)buffer);
826826 _tcscpy(buffer, _T("2x"));
827827 SendDlgItemMessage(hTabs[0], IDC_PRESCALESIZE, CB_ADDSTRING, 0, (LPARAM)buffer);
Index: dxglcfg2/dxglcfg2.rc
@@ -61,7 +61,7 @@
6262 COMBOBOX IDC_FULLMODE, 8, 143, 101, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
6363 LTEXT "Scaling method (1st pass)", IDC_STATIC, 7, 32, 83, 9, SS_LEFT, WS_EX_LEFT
6464 COMBOBOX IDC_PRESCALE, 7, 43, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
65 - LTEXT "1st Pass Scale size", 0, 114, 32, 60, 9, SS_LEFT, WS_EX_LEFT
 65+ LTEXT "1st pass scale size", 0, 114, 32, 60, 9, SS_LEFT, WS_EX_LEFT
6666 COMBOBOX IDC_PRESCALESIZE, 114, 43, 102, 30, CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
6767 }
6868