Index: cfgmgr/ReadMe.txt |
— | — | @@ -1,5 +1,8 @@ |
2 | 2 | Struct DXGLCFG
|
| 3 | +
|
3 | 4 | Member scaler
|
| 5 | +INI Entry ScalingMode
|
| 6 | +INI Group display
|
4 | 7 | REG_DWORD HKCU\DXGL\Profiles\<app>\ScalingMode
|
5 | 8 | Determines the method of scaling full screen modes.
|
6 | 9 | Valid settings:
|
— | — | @@ -13,6 +16,8 @@ |
14 | 17 | 7 - Crop output to desktop, preserving aspect ratio
|
15 | 18 |
|
16 | 19 | Member fullmode
|
| 20 | +INI Entry FullscreenWindowMode
|
| 21 | +INI Group display
|
17 | 22 | REG_DWORD HKCU\DXGL\Profiles\<app>\FullscreenWindowMode
|
18 | 23 | Determines how to handle fullscreen modes.
|
19 | 24 | Valid settings:
|
— | — | @@ -23,32 +28,63 @@ |
24 | 29 | 4 - Use a borderless, non-resizable window, called windowed borderless in industry
|
25 | 30 |
|
26 | 31 | Member colormode
|
| 32 | +INI Entry ChangeColorDepth
|
| 33 | +INI Group display
|
27 | 34 | REG_DWORD HKCU\DXGL\Profiles\<app>\ChangeColorDepth
|
28 | 35 | If nonzero, switches screen color depth if requested by the application.
|
29 | 36 | Recommended setting is off. DXGL handles color depth conversion internally.
|
30 | 37 |
|
31 | | -Member firstscalefilter
|
32 | | -REG_DWORD HKCU\DXGL\Profiles\<app>\FirstScaleFilter
|
33 | | -Filter to use for the optional first pass display scaling.
|
| 38 | +Member AllColorDepths
|
| 39 | +REG_DWORD HKCU\DXGL\Profiles\<app>\AllColorDepths
|
| 40 | +[DEPRECATED FOR DXGLCFG2]Enable all color depths, even if unsupported by the system
|
34 | 41 | Valid settings:
|
35 | | -0 - Nearest-neighbor stretching
|
36 | | -1 - Bilinear interpolation
|
| 42 | +0 - Off
|
| 43 | +1 - On
|
37 | 44 |
|
38 | | -Member firstscalex
|
39 | | -REG_DWORD HKCU\DXGL\Profiles\<app>\FirstScaleX
|
40 | | -Amount to stretch the display in the X direction for the first pass.
|
41 | | -If either X or Y is set to 0 or less than 0.25, automatically choose
|
42 | | -2x, 2x1, or 1x2 scaling for certain low resolutions.
|
43 | | -Stored as a 32-bit float encoded as a DWORD.
|
| 45 | +Member AddColorDepths
|
| 46 | +REG_DWORD HKCU\DXGL\Profiles\<app>\AddColorDepths
|
| 47 | +Adds color depths, even if unsupported by the system
|
| 48 | +Bit-mapped variable
|
| 49 | +Valid settings, OR'ed to combine settings:
|
| 50 | +0 - None
|
| 51 | +1 - Add 8-bit modes
|
| 52 | +2 - Add 15-bit modes
|
| 53 | +4 - Add 16-bit modes
|
| 54 | +8 - Add 24-bit modes
|
| 55 | +16 - Add 32-bit modes
|
44 | 56 |
|
45 | | -Member firstscaley
|
46 | | -REG_DWORD HKCU\DXGL\Profiles\<app>\FirstScaley
|
47 | | -Amount to stretch the display in the Y direction for the first pass.
|
48 | | -If either X or Y is set to 0 or less than 0.25, automatically choose
|
49 | | -2x, 2x1, or 1x2 scaling for certain low resolutions.
|
50 | | -Stored as a 32-bit float encoded as a DWORD.
|
| 57 | +Member ExtraModes
|
| 58 | +REG_DWORD HKCU\DXGL\Profiles\<app>\ExtraModes
|
| 59 | +[DEPRECATED FOR DXGLCFG2]Enable extra video modes, even if unsupported by the system
|
| 60 | +Valid settings:
|
| 61 | +0 - Off
|
| 62 | +1 - On
|
51 | 63 |
|
| 64 | +member AddModes
|
| 65 | +REG_DWORD HKCU\DXGL\Profiles\<app>\AddModes
|
| 66 | +Adds additional video modes, even if unsupported by the system
|
| 67 | +Bit-mapped variable
|
| 68 | +Valid settings, OR'ed to combine settings:
|
| 69 | +0 - None
|
| 70 | +1 - Add common low-resolution modes
|
| 71 | +2 - Add less common low-resolution modes
|
| 72 | +4 - Add uncommon standard definition modes
|
| 73 | +8 - Add high definition modes
|
| 74 | +16 - Add QHD to UHD modes.
|
| 75 | +32 - Add over-4K UHD modes. Check GPU specifications before enabling.
|
| 76 | +64 - Add very uncommon resolutions of all dimensions.
|
| 77 | +
|
| 78 | +Member SortModes
|
| 79 | +REG_DWORD HKCU\DXGL\Profiles\<app>\SortModes
|
| 80 | +Sort display modes
|
| 81 | +Valid settings:
|
| 82 | +0 - As reported by system
|
| 83 | +1 - Group by depth
|
| 84 | +2 - Group by resolution
|
| 85 | +
|
52 | 86 | Member scalingfilter
|
| 87 | +INI Entry ScalingFilter
|
| 88 | +INI Group scaling
|
53 | 89 | REG_DWORD HKCU\DXGL\Profiles\<app>\ScalingFilter
|
54 | 90 | Filter to use for stretched 2D blits and the final display scaling.
|
55 | 91 | Valid settings:
|
— | — | @@ -56,6 +92,8 @@ |
57 | 93 | 1 - Bilinear interpolation
|
58 | 94 |
|
59 | 95 | Member primaryscale
|
| 96 | +INI Entry AdjustPrimaryResolution
|
| 97 | +INI Group scaling
|
60 | 98 | REG_DWORD HKCU\DXGL\Profiles\<app>\AdjustPrimaryResolution
|
61 | 99 | Changes primary resolution to match desktop resolution.
|
62 | 100 | May cause glitches
|
— | — | @@ -62,6 +100,7 @@ |
63 | 101 | Valid settings:
|
64 | 102 | 0 - Use native primary surface size. Most compatible.
|
65 | 103 | 1 - Adjust primary surface size to match display.
|
| 104 | +(future)
|
66 | 105 | 2 - Adjust primary surface to nearest integer multiple of native.
|
67 | 106 | 3 - Use exact 1.5x scale.
|
68 | 107 | 4 - Use exact 2x scale.
|
— | — | @@ -70,19 +109,90 @@ |
71 | 110 | 7 - Use exact 4x scale.
|
72 | 111 | 8 - Use custom scale.
|
73 | 112 |
|
| 113 | +(future)
|
74 | 114 | Member primaryscalex
|
| 115 | +INI Entry PrimaryScaleX
|
| 116 | +INI Group scaling
|
75 | 117 | REG_DWORD HKCU\DXGL\Profiles\<app>\PrimaryScaleX
|
76 | 118 | Custom X scale for primary scaling.
|
77 | 119 | Stored as a 32-bit float encoded as a DWORD.
|
78 | 120 | If zero, negative, or an invalid value, set to 1.
|
79 | 121 |
|
| 122 | +(future)
|
80 | 123 | Member primaryscaley
|
| 124 | +INI Entry PrimaryScaleY
|
| 125 | +INI Group scaling
|
81 | 126 | REG_DWORD HKCU\DXGL\Profiles\<app>\PrimaryScaleY
|
82 | 127 | Custom X scale for primary scaling.
|
83 | 128 | Stored as a 32-bit float encoded as a DWORD.
|
84 | 129 | If zero, negative, or an invalid value, set to 1.
|
85 | 130 |
|
| 131 | +Member aspect
|
| 132 | +INI Entry ScreenAspect
|
| 133 | +INI Group scaling
|
| 134 | +REG_DWORD HKCU\DXGL\Profiles\<app>\ScreenAspect
|
| 135 | +Screen aspect ratio to simulate, if the scaler is 1 or 5.
|
| 136 | +Stored as a 32-bit float encoded as a DWORD.
|
| 137 | +If zero, negative, or an invalid value, use automatic ratio based on square pixels.
|
| 138 | +Positive values indicate a specific screen aspect ratio.
|
| 139 | +
|
| 140 | +Member DPIScale
|
| 141 | +INI Entry DPIScale
|
| 142 | +INI Group scaling
|
| 143 | +REG_DWORD HKCU\DXGL\Profiles\<app>\DPIScale
|
| 144 | +Enable DPI scaling fix
|
| 145 | +The program may be restarted if the Windows AppCompat method is enabled or
|
| 146 | +disabled.
|
| 147 | +Valid settings:
|
| 148 | +0 - Disabled
|
| 149 | +1 - Enabled
|
| 150 | +2 - Use Windows AppCompat
|
| 151 | +
|
| 152 | +Member postfilter
|
| 153 | +INI Entry PostprocessFilter
|
| 154 | +INI Group postprocess
|
| 155 | +REG_DWORD HKCU\DXGL\Profiles\<app>\PostprocessFilter
|
| 156 | +Alternately reads from REG_DWORD HKCU\DXGL\Profiles\<app>\FirstScaleFilter
|
| 157 | +Filter to use for the optional postprocess display scaling.
|
| 158 | +Valid settings:
|
| 159 | +0 - Nearest-neighbor stretching
|
| 160 | +1 - Bilinear interpolation
|
| 161 | +
|
| 162 | +Member postsizex
|
| 163 | +INI Entry PostprocessScaleX
|
| 164 | +INI Group postprocess
|
| 165 | +REG_DWORD HKCU\DXGL\Profiles\<app>\PostprocessScaleX
|
| 166 | +Alternately reads from REG_DWORD HKCU\DXGL\Profiles\<app>\FirstScaleX
|
| 167 | +Amount to stretch the display in the X direction for the postprocess pass.
|
| 168 | +If either X or Y is set to 0 or less than 0.25, automatically choose
|
| 169 | +2x, 2x1, or 1x2 scaling for certain low resolutions.
|
| 170 | +Stored as a 32-bit float encoded as a DWORD.
|
| 171 | +
|
| 172 | +Member postsizey
|
| 173 | +INI Entry PostprocessScaleY
|
| 174 | +INI Group postprocess
|
| 175 | +REG_DWORD HKCU\DXGL\Profiles\<app>\PostprocessScaleY
|
| 176 | +Alternately reads from REG_DWORD HKCU\DXGL\Profiles\<app>\FirstScaleY
|
| 177 | +Amount to stretch the display in the Y direction for the postprocess pass.
|
| 178 | +If either X or Y is set to 0 or less than 0.25, automatically choose
|
| 179 | +2x, 2x1, or 1x2 scaling for certain low resolutions.
|
| 180 | +Stored as a 32-bit float encoded as a DWORD.
|
| 181 | +
|
| 182 | +Member EnableShader
|
| 183 | +INI Entry EnableShader
|
| 184 | +INI Group postprocess
|
| 185 | +REG_DWORD HKCU\DXGL\Profiles\<app>\EnableShader
|
| 186 | +If nonzero, enables post-process shaders.
|
| 187 | +
|
| 188 | +Member shaderfile
|
| 189 | +INI Entry ShaderFile
|
| 190 | +INI Group postprocess
|
| 191 | +REG_SZ HKCU\DXGL\Profiles\<app>\ShaderFile
|
| 192 | +Full path to file containing a post-process shader script.
|
| 193 | +
|
86 | 194 | Member texfilter
|
| 195 | +INI Entry TextureFilter
|
| 196 | +INI Group d3d
|
87 | 197 | REG_DWORD HKCU\DXGL\Profiles\<app>\TextureFilter
|
88 | 198 | Filter for 3D textured polygons
|
89 | 199 | Valid settings:
|
— | — | @@ -95,6 +205,8 @@ |
96 | 206 | 6 - GL_LINEAR_MIPMAP_LINEAR (Trilinear filtering)
|
97 | 207 |
|
98 | 208 | Member anisotropic
|
| 209 | +INI Entry AnisotropicFiltering
|
| 210 | +INI Group d3d
|
99 | 211 | REG_DWORD HKCU\DXGL\Profiles\<app>\AnisotropicFiltering
|
100 | 212 | Anisotropic filter level, may decrese performance on slower GPUs.
|
101 | 213 | Valid settings:
|
— | — | @@ -103,6 +215,8 @@ |
104 | 216 | Larger numbers enable anisotropic filtering, maximum determined by GPU driver.
|
105 | 217 |
|
106 | 218 | member msaa
|
| 219 | +INI Entry Antialiasing
|
| 220 | +INI Group d3d
|
107 | 221 | REG_DWORD HKCU\DXGL\Profiles\<app>\Antialiasing
|
108 | 222 | Level of Full Screen Antialiasing. May considerably decrease performance on
|
109 | 223 | slower GPUs.
|
— | — | @@ -115,7 +229,10 @@ |
116 | 230 | Example: 16 coverage, 8 color = 0x8010
|
117 | 231 |
|
118 | 232 | Member aspect3d
|
119 | | -REG_DWORD HKCU\DXGL\Profiles\<app>\AdjustAspectRatio
|
| 233 | +INI Entry D3DAspect
|
| 234 | +INI Group d3d
|
| 235 | +REG_DWORD HKCU\DXGL\Profiles\<app>\D3DAspect
|
| 236 | +Altrenately reads from REG_DWORD HKCU\DXGL\Profiles\<app>\AdjustAspectRatio
|
120 | 237 | If the scaler is 1 or 4, adjust 3D projection to correct aspect ratio. Does
|
121 | 238 | not affect 2D blits or similar operations.
|
122 | 239 | Valid settings:
|
— | — | @@ -123,59 +240,9 @@ |
124 | 241 | 1 - Expand viewable area. May have glitches on edge of screen.
|
125 | 242 | 2 - Crop to viewable area. May cause graphics to get cut off.
|
126 | 243 |
|
127 | | -Member EnableShader
|
128 | | -REG_DWORD HKCU\DXGL\Profiles\<app>\EnableShader
|
129 | | -If nonzero, enables post-process shaders.
|
130 | | -
|
131 | | -Member shaderfile
|
132 | | -REG_SZ HKCU\DXGL\Profiles\<app>\ShaderFile
|
133 | | -Full path to file containing a post-process shader script.
|
134 | | -
|
135 | | -Member SortModes
|
136 | | -REG_DWORD HKCU\DXGL\Profiles\<app>\SortModes
|
137 | | -Sort display modes
|
138 | | -Valid settings:
|
139 | | -0 - As reported by system
|
140 | | -1 - Group by depth
|
141 | | -2 - Group by resolution
|
142 | | -
|
143 | | -Member AllColorDepths
|
144 | | -REG_DWORD HKCU\DXGL\Profiles\<app>\AllColorDepths
|
145 | | -[DEPRECATED]Enable all color depths, even if unsupported by the system
|
146 | | -Valid settings:
|
147 | | -0 - Off
|
148 | | -1 - On
|
149 | | -
|
150 | | -Member AddColorDepths
|
151 | | -REG_DWORD HKCU\DXGL\Profiles\<app>\AddColorDepths
|
152 | | -Adds color depths, even if unsupported by the system
|
153 | | -Bit-mapped variable
|
154 | | -Valid settings, OR'ed to combine settings:
|
155 | | -0 - None
|
156 | | -1 - Add 8-bit modes
|
157 | | -2 - Add 15-bit modes
|
158 | | -4 - Add 16-bit modes
|
159 | | -8 - Add 24-bit modes
|
160 | | -16 - Add 32-bit modes
|
161 | | -
|
162 | | -Member ExtraModes
|
163 | | -REG_DWORD HKCU\DXGL\Profiles\<app>\ExtraModes
|
164 | | -[DEPRECATED]Enable extra video modes, even if unsupported by the system
|
165 | | -Valid settings:
|
166 | | -0 - Off
|
167 | | -1 - On
|
168 | | -
|
169 | | -member AddModes
|
170 | | -REG_DWORD HKCU\DXGL\Profiles\<app>\AddModes
|
171 | | -Adds additional video modes, even if unsupported by the system
|
172 | | -Bit-mapped variable
|
173 | | -Valid settings, OR'ed to combine settings:
|
174 | | -0 - None
|
175 | | -1 - Add common low-resolution modes
|
176 | | -2 - Add less common low-resolution modes
|
177 | | -4 - Add higher resolution modes
|
178 | | -
|
179 | 244 | Member vsync
|
| 245 | +INI Entry VSync
|
| 246 | +INI Group advanced
|
180 | 247 | REG_DWORD HKCU\DXGL\Profiles\<app>\VSync
|
181 | 248 | Vertical retrace control
|
182 | 249 | Valid settings:
|
— | — | @@ -182,6 +249,8 @@ |
183 | 250 | 0 - Determined by application
|
184 | 251 |
|
185 | 252 | Member TextureFormat
|
| 253 | +INI Entry TextureFormat
|
| 254 | +INI Group advanced
|
186 | 255 | REG_DWORD HKCU\DXGL\Profiles\<app>\TextureFormat
|
187 | 256 | Texture format
|
188 | 257 | Valid settings:
|
— | — | @@ -188,32 +257,18 @@ |
189 | 258 | 0 - Automatic
|
190 | 259 |
|
191 | 260 | Member TexUpload
|
| 261 | +INI Entry TexUpload
|
| 262 | +INI Group advanced
|
192 | 263 | REG_DWORD HKCU\DXGL\Profiles\<app>\TexUpload
|
193 | 264 | Method used to upload textures
|
194 | 265 | Valid settings:
|
195 | 266 | 0 - Automatic
|
196 | | -1 - OpenGL Standard
|
197 | 267 |
|
198 | | -Member DPIScale
|
199 | | -REG_DWORD HKCU\DXGL\Profiles\<app>\DPIScale
|
200 | | -Enable DPI scaling fix
|
201 | | -The program may be restarted if the Windows AppCompat method is enabled or
|
202 | | -disabled.
|
203 | | -Valid settings:
|
204 | | -0 - Disabled
|
205 | | -1 - Enabled
|
206 | | -2 - Use Windows AppCompat
|
207 | | -
|
208 | | -Member aspect
|
209 | | -REG_DWORD HKCU\DXGL\Profiles\<app>\ScreenAspect
|
210 | | -Screen aspect ratio to simulate, if the scaler is 1 or 5.
|
211 | | -Stored as a 32-bit float encoded as a DWORD.
|
212 | | -If zero, negative, or an invalid value, use automatic ratio based on square pixels.
|
213 | | -Positive values indicate a specific screen aspect ratio.
|
214 | | -
|
215 | 268 | Member Windows8Detected
|
| 269 | +Not in INI file
|
216 | 270 | REG_DWORD HKCU\DXGL\Global\Windows8Detected
|
217 | 271 | Nonzero if Windows 8 (or later) is detected.
|
218 | 272 | If zero or undefined and Windows 8 (or later) is detected, AllColorDepths in
|
219 | 273 | Global key is set to 1 and Windows8Detected is also set to 1.
|
220 | | -If nonzero, AllColorDepths is not affected. |
\ No newline at end of file |
| 274 | +If nonzero, AllColorDepths is not affected.
|
| 275 | +
|
Index: cfgmgr/cfgmgr.c |
— | — | @@ -31,6 +31,7 @@ |
32 | 32 | #include "../ddraw/resource.h"
|
33 | 33 | #include <tchar.h>
|
34 | 34 | #include <math.h>
|
| 35 | +#include <stdarg.h>
|
35 | 36 |
|
36 | 37 | TCHAR regkeyglobal[] = _T("Software\\DXGL\\Global");
|
37 | 38 | TCHAR regkeybase[] = _T("Software\\DXGL\\");
|
— | — | @@ -397,6 +398,42 @@ |
398 | 399 | }
|
399 | 400 | }
|
400 | 401 |
|
| 402 | +DWORD ReadDWORDWithObsolete(HKEY hKey, DWORD original, DWORD *mask, LPCTSTR value,
|
| 403 | + unsigned int obsolete_count, ...) // obsolete items are LPCTSTRs
|
| 404 | +{
|
| 405 | + LPCTSTR obsolete;
|
| 406 | + va_list va;
|
| 407 | + int i;
|
| 408 | + DWORD dwOut;
|
| 409 | + DWORD sizeout = 4;
|
| 410 | + DWORD regdword = REG_DWORD;
|
| 411 | + LSTATUS error = RegQueryValueEx(hKey, value, NULL, ®dword, (LPBYTE)&dwOut, &sizeout);
|
| 412 | + if (error == ERROR_SUCCESS)
|
| 413 | + {
|
| 414 | + *mask = 1;
|
| 415 | + return dwOut;
|
| 416 | + }
|
| 417 | + else
|
| 418 | + {
|
| 419 | + va_start(va, obsolete_count);
|
| 420 | + for (i = 0; i < obsolete_count; i++)
|
| 421 | + {
|
| 422 | + regdword = REG_DWORD;
|
| 423 | + obsolete = va_arg(va, LPCTSTR);
|
| 424 | + error = RegQueryValueEx(hKey, obsolete, NULL, ®dword, (LPBYTE)&dwOut, &sizeout);
|
| 425 | + if (error == ERROR_SUCCESS)
|
| 426 | + {
|
| 427 | + *mask = 1;
|
| 428 | + va_end(va);
|
| 429 | + return dwOut;
|
| 430 | + }
|
| 431 | + }
|
| 432 | + *mask = 0;
|
| 433 | + va_end(va);
|
| 434 | + return original;
|
| 435 | + }
|
| 436 | +}
|
| 437 | +
|
401 | 438 | DWORD ReadDWORD(HKEY hKey, DWORD original, DWORD *mask, LPCTSTR value)
|
402 | 439 | {
|
403 | 440 | DWORD dwOut;
|
— | — | @@ -415,6 +452,42 @@ |
416 | 453 | }
|
417 | 454 | }
|
418 | 455 |
|
| 456 | +float ReadFloatWithObsolete(HKEY hKey, float original, float *mask, LPCTSTR value,
|
| 457 | + unsigned int obsolete_count, ...) // obsolete items are LPCTSTRs
|
| 458 | +{
|
| 459 | + LPCTSTR obsolete;
|
| 460 | + va_list va;
|
| 461 | + int i;
|
| 462 | + float dwOut;
|
| 463 | + DWORD sizeout = 4;
|
| 464 | + DWORD regdword = REG_DWORD;
|
| 465 | + LSTATUS error = RegQueryValueEx(hKey, value, NULL, ®dword, (LPBYTE)&dwOut, &sizeout);
|
| 466 | + if (error == ERROR_SUCCESS)
|
| 467 | + {
|
| 468 | + *mask = 1.0f;
|
| 469 | + return dwOut;
|
| 470 | + }
|
| 471 | + else
|
| 472 | + {
|
| 473 | + va_start(va, obsolete_count);
|
| 474 | + for (i = 0; i < obsolete_count; i++)
|
| 475 | + {
|
| 476 | + regdword = REG_DWORD;
|
| 477 | + obsolete = va_arg(va, LPCTSTR);
|
| 478 | + error = RegQueryValueEx(hKey, obsolete, NULL, ®dword, (LPBYTE)&dwOut, &sizeout);
|
| 479 | + if (error == ERROR_SUCCESS)
|
| 480 | + {
|
| 481 | + *mask = 1.0f;
|
| 482 | + va_end(va);
|
| 483 | + return dwOut;
|
| 484 | + }
|
| 485 | + }
|
| 486 | + *mask = 0.0f;
|
| 487 | + va_end(va);
|
| 488 | + return original;
|
| 489 | + }
|
| 490 | +}
|
| 491 | +
|
419 | 492 | float ReadFloat(HKEY hKey, float original, float *mask, LPCTSTR value)
|
420 | 493 | {
|
421 | 494 | float dwOut;
|
— | — | @@ -458,9 +531,12 @@ |
459 | 532 | cfg->scaler = ReadDWORD(hKey, cfg->scaler, &cfgmask->scaler, _T("ScalingMode"));
|
460 | 533 | cfg->fullmode = ReadDWORD(hKey, cfg->fullmode, &cfgmask->fullmode, _T("FullscreenWindowMode"));
|
461 | 534 | cfg->colormode = ReadBool(hKey,cfg->colormode,&cfgmask->colormode,_T("ChangeColorDepth"));
|
462 | | - cfg->firstscalefilter = ReadDWORD(hKey, cfg->firstscalefilter, &cfgmask->firstscalefilter, _T("FirstScaleFilter"));
|
463 | | - cfg->firstscalex = ReadFloat(hKey, cfg->firstscalex, &cfgmask->firstscalex, _T("FirstScaleX"));
|
464 | | - cfg->firstscaley = ReadFloat(hKey, cfg->firstscaley, &cfgmask->firstscaley, _T("FirstScaleY"));
|
| 535 | + cfg->postfilter = ReadDWORDWithObsolete(hKey, cfg->postfilter, &cfgmask->postfilter, _T("PostprocessFilter"),
|
| 536 | + 1, _T("FirstScaleFilter"));
|
| 537 | + cfg->postsizex = ReadFloatWithObsolete(hKey, cfg->postsizex, &cfgmask->postsizex, _T("PostprocessScaleX"),
|
| 538 | + 1, _T("FirstScaleX"));
|
| 539 | + cfg->postsizey = ReadFloatWithObsolete(hKey, cfg->postsizey, &cfgmask->postsizey, _T("PostprocessScaleY"),
|
| 540 | + 1, _T("FirstScaleY"));
|
465 | 541 | cfg->scalingfilter = ReadDWORD(hKey,cfg->scalingfilter,&cfgmask->scalingfilter,_T("ScalingFilter"));
|
466 | 542 | cfg->texfilter = ReadDWORD(hKey,cfg->texfilter,&cfgmask->texfilter,_T("TextureFilter"));
|
467 | 543 | cfg->anisotropic = ReadDWORD(hKey,cfg->anisotropic,&cfgmask->anisotropic,_T("AnisotropicFiltering"));
|
— | — | @@ -507,6 +583,23 @@ |
508 | 584 | else RegDeleteValue(hKey,name);
|
509 | 585 | }
|
510 | 586 |
|
| 587 | +void WriteDWORDDeleteObsolete(HKEY hKey, DWORD value, DWORD mask, LPCTSTR name,
|
| 588 | + unsigned int obsolete_count, ...) // obsolete items are LPCTSTRs
|
| 589 | +{
|
| 590 | + LPCTSTR obsolete;
|
| 591 | + va_list va;
|
| 592 | + int i;
|
| 593 | + va_start(va, obsolete_count);
|
| 594 | + for (i = 0; i < obsolete_count; i++)
|
| 595 | + {
|
| 596 | + obsolete = va_arg(va, LPCTSTR);
|
| 597 | + RegDeleteValue(hKey, obsolete);
|
| 598 | + }
|
| 599 | + va_end(va);
|
| 600 | + if (mask) RegSetValueEx(hKey, name, 0, REG_DWORD, (BYTE*)&value, 4);
|
| 601 | + else RegDeleteValue(hKey, name);
|
| 602 | +}
|
| 603 | +
|
511 | 604 | void WriteDWORD(HKEY hKey, DWORD value, DWORD mask, LPCTSTR name)
|
512 | 605 | {
|
513 | 606 | if(mask) RegSetValueEx(hKey,name,0,REG_DWORD,(BYTE*)&value,4);
|
— | — | @@ -517,6 +610,23 @@ |
518 | 611 | if(mask[0]) RegSetValueEx(hKey,name,0,REG_SZ,(BYTE*)path,(_tcslen(path)+1)*sizeof(TCHAR));
|
519 | 612 | else RegDeleteValue(hKey,name);
|
520 | 613 | }
|
| 614 | +
|
| 615 | +void WriteFloatDeleteObsolete(HKEY hKey, float value, float mask, LPCTSTR name,
|
| 616 | + unsigned int obsolete_count, ...) // obsolete items are LPCTSTRs
|
| 617 | +{
|
| 618 | + LPCTSTR obsolete;
|
| 619 | + va_list va;
|
| 620 | + int i;
|
| 621 | + va_start(va, obsolete_count);
|
| 622 | + for (i = 0; i < obsolete_count; i++)
|
| 623 | + {
|
| 624 | + obsolete = va_arg(va, LPCTSTR);
|
| 625 | + RegDeleteValue(hKey, obsolete);
|
| 626 | + }
|
| 627 | + va_end(va);
|
| 628 | + if (fabsf(mask) > 0.5f) RegSetValueEx(hKey, name, 0, REG_DWORD, (BYTE*)&value, 4);
|
| 629 | + else RegDeleteValue(hKey, name);
|
| 630 | +}
|
521 | 631 | void WriteFloat(HKEY hKey, float value, float mask, LPCTSTR name)
|
522 | 632 | {
|
523 | 633 | if (fabsf(mask) > 0.5f) RegSetValueEx(hKey, name, 0, REG_DWORD, (BYTE*)&value, 4);
|
— | — | @@ -530,14 +640,17 @@ |
531 | 641 | else cfgmask = &defaultmask;
|
532 | 642 | memset(&defaultmask,1,sizeof(DXGLCFG));
|
533 | 643 | defaultmask.aspect = 1.0f;
|
534 | | - defaultmask.firstscalex = 1.0f;
|
535 | | - defaultmask.firstscaley = 1.0f;
|
| 644 | + defaultmask.postsizex = 1.0f;
|
| 645 | + defaultmask.postsizey = 1.0f;
|
536 | 646 | WriteDWORD(hKey,cfg->scaler,cfgmask->scaler,_T("ScalingMode"));
|
537 | 647 | WriteDWORD(hKey, cfg->fullmode, cfgmask->fullmode, _T("FullscreenWindowMode"));
|
538 | 648 | WriteBool(hKey,cfg->colormode,cfgmask->colormode,_T("ChangeColorDepth"));
|
539 | | - WriteDWORD(hKey, cfg->firstscalefilter, cfgmask->firstscalefilter, _T("FirstScaleFilter"));
|
540 | | - WriteFloat(hKey, cfg->firstscalex, cfgmask->firstscalex, _T("FirstScaleX"));
|
541 | | - WriteFloat(hKey, cfg->firstscaley, cfgmask->firstscaley, _T("FirstScaleY"));
|
| 649 | + WriteDWORDDeleteObsolete(hKey, cfg->postfilter, cfgmask->postfilter, _T("PostprocessFilter"),
|
| 650 | + 1, _T("FirstScaleFilter"));
|
| 651 | + WriteFloatDeleteObsolete(hKey, cfg->postsizex, cfgmask->postsizex, _T("PostprocessScaleX"),
|
| 652 | + 1, _T("FirstScaleX"));
|
| 653 | + WriteFloatDeleteObsolete(hKey, cfg->postsizey, cfgmask->postsizey, _T("PostprocessScaleY"),
|
| 654 | + 1, _T("FirstScaleY"));
|
542 | 655 | WriteDWORD(hKey,cfg->scalingfilter,cfgmask->scalingfilter,_T("ScalingFilter"));
|
543 | 656 | WriteDWORD(hKey,cfg->texfilter,cfgmask->texfilter,_T("TextureFilter"));
|
544 | 657 | WriteDWORD(hKey,cfg->anisotropic,cfgmask->anisotropic,_T("AnisotropicFiltering"));
|
Index: cfgmgr/cfgmgr.h |
— | — | @@ -28,9 +28,9 @@ |
29 | 29 | DWORD scaler;
|
30 | 30 | DWORD fullmode;
|
31 | 31 | BOOL colormode;
|
32 | | - DWORD firstscalefilter;
|
33 | | - float firstscalex;
|
34 | | - float firstscaley;
|
| 32 | + DWORD postfilter;
|
| 33 | + float postsizex;
|
| 34 | + float postsizey;
|
35 | 35 | DWORD scalingfilter;
|
36 | 36 | DWORD texfilter;
|
37 | 37 | DWORD anisotropic;
|
Index: ddraw/glDirectDraw.cpp |
— | — | @@ -483,9 +483,9 @@ |
484 | 484 | ddmode.dwSize = sizeof(DDSURFACEDESC);
|
485 | 485 | ddmode.dwFlags = DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH | DDSD_PIXELFORMAT | DDSD_REFRESHRATE;
|
486 | 486 | ddmode.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);
|
487 | | - if (!_isnan(dxglcfg.firstscalex) && !_isnan(dxglcfg.firstscaley) &&
|
488 | | - (dxglcfg.firstscalex > 0.25f) && (dxglcfg.firstscaley > 0.25f) &&
|
489 | | - (dxglcfg.firstscalex != 1.0f) && (dxglcfg.firstscaley != 1.0f) &&
|
| 487 | + if (!_isnan(dxglcfg.postsizex) && !_isnan(dxglcfg.postsizey) &&
|
| 488 | + (dxglcfg.postsizex > 0.25f) && (dxglcfg.postsizey > 0.25f) &&
|
| 489 | + (dxglcfg.postsizex != 1.0f) && (dxglcfg.postsizey != 1.0f) &&
|
490 | 490 | ((dxglcfg.scaler == 0) || ((dxglcfg.scaler >= 4) && (dxglcfg.scaler <= 6))) &&
|
491 | 491 | (!dxglcfg.primaryscale))
|
492 | 492 | scalemodes = TRUE;
|
— | — | @@ -494,8 +494,8 @@ |
495 | 495 | {
|
496 | 496 | if (scalemodes)
|
497 | 497 | {
|
498 | | - mode.dmPelsWidth /= dxglcfg.firstscalex;
|
499 | | - mode.dmPelsHeight /= dxglcfg.firstscaley;
|
| 498 | + mode.dmPelsWidth /= dxglcfg.postsizex;
|
| 499 | + mode.dmPelsHeight /= dxglcfg.postsizey;
|
500 | 500 | }
|
501 | 501 | modes[modenum-1] = mode;
|
502 | 502 | if(modenum >= modemax)
|
— | — | @@ -514,8 +514,8 @@ |
515 | 515 | if(dxglcfg.AddColorDepths) AddExtraColorModes(&modes,&modenum); // FIXME: Add color depths by bitmask
|
516 | 516 | DiscardDuplicateModes(&modes,&modenum);
|
517 | 517 | if(dxglcfg.AddModes && (dxglcfg.scaler != 0)) AddExtraResolutions(&modes,&modenum); // FIXME: Add modes by bitmask
|
518 | | - if (dxglcfg.AddModes && (_isnan(dxglcfg.firstscalex) || _isnan(dxglcfg.firstscaley) ||
|
519 | | - (dxglcfg.firstscalex < 0.25f) || (dxglcfg.firstscaley < 0.25f)))
|
| 518 | + if (dxglcfg.AddModes && (_isnan(dxglcfg.postsizex) || _isnan(dxglcfg.postsizey) ||
|
| 519 | + (dxglcfg.postsizex < 0.25f) || (dxglcfg.postsizey < 0.25f)))
|
520 | 520 | AddDoubledResolutions(&modes, &modenum);
|
521 | 521 | modenum--;
|
522 | 522 | switch(dxglcfg.SortModes)
|
— | — | @@ -1785,8 +1785,8 @@ |
1786 | 1786 | currmode.dmSize = sizeof(DEVMODE);
|
1787 | 1787 | EnumDisplaySettings(NULL,ENUM_CURRENT_SETTINGS,&currmode);
|
1788 | 1788 | this->currmode.dmSize = 0;
|
1789 | | - if (_isnan(dxglcfg.firstscalex) || _isnan(dxglcfg.firstscaley) ||
|
1790 | | - (dxglcfg.firstscalex < 0.25f) || (dxglcfg.firstscaley < 0.25f))
|
| 1789 | + if (_isnan(dxglcfg.postsizex) || _isnan(dxglcfg.postsizey) ||
|
| 1790 | + (dxglcfg.postsizex < 0.25f) || (dxglcfg.postsizey < 0.25f))
|
1791 | 1791 | {
|
1792 | 1792 | if (dwWidth <= 400) xscale = 2.0f;
|
1793 | 1793 | else xscale = 1.0f;
|
— | — | @@ -1795,8 +1795,8 @@ |
1796 | 1796 | }
|
1797 | 1797 | else
|
1798 | 1798 | {
|
1799 | | - xscale = dxglcfg.firstscalex;
|
1800 | | - yscale = dxglcfg.firstscaley;
|
| 1799 | + xscale = dxglcfg.postsizex;
|
| 1800 | + yscale = dxglcfg.postsizey;
|
1801 | 1801 | }
|
1802 | 1802 | switch (dxglcfg.fullmode)
|
1803 | 1803 | {
|
— | — | @@ -1810,8 +1810,8 @@ |
1811 | 1811 | default:
|
1812 | 1812 | newmode.dmSize = sizeof(DEVMODE);
|
1813 | 1813 | newmode.dmDriverExtra = 0;
|
1814 | | - if (!dxglcfg.primaryscale || (_isnan(dxglcfg.firstscalex) || _isnan(dxglcfg.firstscaley) ||
|
1815 | | - (dxglcfg.firstscalex < 0.25f) || (dxglcfg.firstscaley < 0.25f)))
|
| 1814 | + if (!dxglcfg.primaryscale || (_isnan(dxglcfg.postsizex) || _isnan(dxglcfg.postsizey) ||
|
| 1815 | + (dxglcfg.postsizex < 0.25f) || (dxglcfg.postsizey < 0.25f)))
|
1816 | 1816 | {
|
1817 | 1817 | newmode.dmPelsWidth = dwWidth * xscale;
|
1818 | 1818 | newmode.dmPelsHeight = dwHeight * yscale;
|
Index: ddraw/glDirectDrawSurface.cpp |
— | — | @@ -92,8 +92,8 @@ |
93 | 93 | ddsd.dwHeight = sizes[3];
|
94 | 94 | if(dxglcfg.primaryscale)
|
95 | 95 | {
|
96 | | - if (_isnan(dxglcfg.firstscalex) || _isnan(dxglcfg.firstscaley) ||
|
97 | | - (dxglcfg.firstscalex < 0.25f) || (dxglcfg.firstscaley < 0.25f))
|
| 96 | + if (_isnan(dxglcfg.postsizex) || _isnan(dxglcfg.postsizey) ||
|
| 97 | + (dxglcfg.postsizex < 0.25f) || (dxglcfg.postsizey < 0.25f))
|
98 | 98 | {
|
99 | 99 | if (ddsd.dwWidth <= 400) xscale = 2.0f;
|
100 | 100 | else xscale = 1.0f;
|
— | — | @@ -102,8 +102,8 @@ |
103 | 103 | }
|
104 | 104 | else
|
105 | 105 | {
|
106 | | - xscale = dxglcfg.firstscalex;
|
107 | | - yscale = dxglcfg.firstscaley;
|
| 106 | + xscale = dxglcfg.postsizex;
|
| 107 | + yscale = dxglcfg.postsizey;
|
108 | 108 | }
|
109 | 109 | fakex = (DWORD)((float)sizes[0] / xscale);
|
110 | 110 | fakey = (DWORD)((float)sizes[1] / yscale);
|
— | — | @@ -1232,8 +1232,8 @@ |
1233 | 1233 | ddsd.dwHeight = sizes[3];
|
1234 | 1234 | if(dxglcfg.primaryscale)
|
1235 | 1235 | {
|
1236 | | - if (_isnan(dxglcfg.firstscalex) || _isnan(dxglcfg.firstscaley) ||
|
1237 | | - (dxglcfg.firstscalex < 0.25f) || (dxglcfg.firstscaley < 0.25f))
|
| 1236 | + if (_isnan(dxglcfg.postsizex) || _isnan(dxglcfg.postsizey) ||
|
| 1237 | + (dxglcfg.postsizex < 0.25f) || (dxglcfg.postsizey < 0.25f))
|
1238 | 1238 | {
|
1239 | 1239 | if (ddsd.dwWidth <= 400) xscale = 2.0f;
|
1240 | 1240 | else xscale = 1.0f;
|
— | — | @@ -1242,8 +1242,8 @@ |
1243 | 1243 | }
|
1244 | 1244 | else
|
1245 | 1245 | {
|
1246 | | - xscale = dxglcfg.firstscalex;
|
1247 | | - yscale = dxglcfg.firstscaley;
|
| 1246 | + xscale = dxglcfg.postsizex;
|
| 1247 | + yscale = dxglcfg.postsizey;
|
1248 | 1248 | }
|
1249 | 1249 | fakex = (DWORD)((float)sizes[0] / xscale);
|
1250 | 1250 | fakey = (DWORD)((float)sizes[1] / yscale);
|
— | — | @@ -1286,8 +1286,8 @@ |
1287 | 1287 | ddsd.dwHeight = sizes[3];
|
1288 | 1288 | if(dxglcfg.primaryscale)
|
1289 | 1289 | {
|
1290 | | - if (_isnan(dxglcfg.firstscalex) || _isnan(dxglcfg.firstscaley) ||
|
1291 | | - (dxglcfg.firstscalex < 0.25f) || (dxglcfg.firstscaley < 0.25f))
|
| 1290 | + if (_isnan(dxglcfg.postsizex) || _isnan(dxglcfg.postsizey) ||
|
| 1291 | + (dxglcfg.postsizex < 0.25f) || (dxglcfg.postsizey < 0.25f))
|
1292 | 1292 | {
|
1293 | 1293 | if (ddsd.dwWidth <= 400) xscale = 2.0f;
|
1294 | 1294 | else xscale = 1.0f;
|
— | — | @@ -1296,8 +1296,8 @@ |
1297 | 1297 | }
|
1298 | 1298 | else
|
1299 | 1299 | {
|
1300 | | - xscale = dxglcfg.firstscalex;
|
1301 | | - yscale = dxglcfg.firstscaley;
|
| 1300 | + xscale = dxglcfg.postsizex;
|
| 1301 | + yscale = dxglcfg.postsizey;
|
1302 | 1302 | }
|
1303 | 1303 | fakex = (DWORD)((float)sizes[0] / xscale);
|
1304 | 1304 | fakey = (DWORD)((float)sizes[1] / yscale);
|
Index: ddraw/glRenderer.cpp |
— | — | @@ -2790,16 +2790,16 @@ |
2791 | 2791 | //glRenderer__InitCommandBuffer(This, &This->cmd2, width * height * (NextMultipleOf8(bpp) / 8));
|
2792 | 2792 | //BufferObject_Map(This->cmd1.vertices, GL_ARRAY_BUFFER, GL_WRITE_ONLY);
|
2793 | 2793 | //BufferObject_Map(This->cmd1.indices, GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY);
|
2794 | | - if (_isnan(dxglcfg.firstscalex) || _isnan(dxglcfg.firstscaley) ||
|
2795 | | - (dxglcfg.firstscalex < 0.25f) || (dxglcfg.firstscaley < 0.25f))
|
| 2794 | + if (_isnan(dxglcfg.postsizex) || _isnan(dxglcfg.postsizey) ||
|
| 2795 | + (dxglcfg.postsizex < 0.25f) || (dxglcfg.postsizey < 0.25f))
|
2796 | 2796 | {
|
2797 | | - This->firstscalex = 1.0f;
|
2798 | | - This->firstscaley = 1.0f;
|
| 2797 | + This->postsizex = 1.0f;
|
| 2798 | + This->postsizey = 1.0f;
|
2799 | 2799 | }
|
2800 | 2800 | else
|
2801 | 2801 | {
|
2802 | | - This->firstscalex = dxglcfg.firstscalex;
|
2803 | | - This->firstscaley = dxglcfg.firstscaley;
|
| 2802 | + This->postsizex = dxglcfg.postsizex;
|
| 2803 | + This->postsizey = dxglcfg.postsizey;
|
2804 | 2804 | }
|
2805 | 2805 | TRACE_SYSINFO();
|
2806 | 2806 | return TRUE;
|
— | — | @@ -3213,8 +3213,8 @@ |
3214 | 3214 | GLfloat view[4];
|
3215 | 3215 | DDSURFACEDESC2 ddsd;
|
3216 | 3216 | DWORD x2, y2;
|
3217 | | - x2 = x * This->firstscalex;
|
3218 | | - y2 = y * This->firstscaley;
|
| 3217 | + x2 = x * This->postsizex;
|
| 3218 | + y2 = y * This->postsizey;
|
3219 | 3219 | glUtil_SetActiveTexture(This->util,8);
|
3220 | 3220 | if(!This->backbuffer)
|
3221 | 3221 | {
|
— | — | @@ -3242,7 +3242,7 @@ |
3243 | 3243 | glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
|
3244 | 3244 | glUtil_SetTexture(This->util,8,*texture);
|
3245 | 3245 | *texture = This->backbuffer;
|
3246 | | - if (!paletted && firstpass && (dxglcfg.firstscalefilter == 1))
|
| 3246 | + if (!paletted && firstpass && (dxglcfg.postfilter == 1))
|
3247 | 3247 | glTexture__SetFilter(*texture, 8, GL_LINEAR, GL_LINEAR, This);
|
3248 | 3248 | else glTexture__SetFilter(*texture, 8, GL_NEAREST, GL_NEAREST, This);
|
3249 | 3249 | This->ext->glUniform4f(This->shaders->shaders[progtype].view,view[0],view[1],view[2],view[3]);
|
— | — | @@ -3342,18 +3342,18 @@ |
3343 | 3343 | if(This->ddInterface->GetFullscreen())
|
3344 | 3344 | {
|
3345 | 3345 | This->ddInterface->GetSizes(sizes);
|
3346 | | - if (_isnan(dxglcfg.firstscalex) || _isnan(dxglcfg.firstscaley) ||
|
3347 | | - (dxglcfg.firstscalex < 0.25f) || (dxglcfg.firstscaley < 0.25f))
|
| 3346 | + if (_isnan(dxglcfg.postsizex) || _isnan(dxglcfg.postsizey) ||
|
| 3347 | + (dxglcfg.postsizex < 0.25f) || (dxglcfg.postsizey < 0.25f))
|
3348 | 3348 | {
|
3349 | | - if (sizes[2] <= 400) This->firstscalex = 2.0f;
|
3350 | | - else This->firstscalex = 1.0f;
|
3351 | | - if (sizes[3] <= 300) This->firstscaley = 2.0f;
|
3352 | | - else This->firstscaley = 1.0f;
|
| 3349 | + if (sizes[2] <= 400) This->postsizex = 2.0f;
|
| 3350 | + else This->postsizex = 1.0f;
|
| 3351 | + if (sizes[3] <= 300) This->postsizey = 2.0f;
|
| 3352 | + else This->postsizey = 1.0f;
|
3353 | 3353 | }
|
3354 | 3354 | else
|
3355 | 3355 | {
|
3356 | | - This->firstscalex = dxglcfg.firstscalex;
|
3357 | | - This->firstscaley = dxglcfg.firstscaley;
|
| 3356 | + This->postsizex = dxglcfg.postsizex;
|
| 3357 | + This->postsizey = dxglcfg.postsizey;
|
3358 | 3358 | }
|
3359 | 3359 | viewport[0] = viewport[1] = 0;
|
3360 | 3360 | viewport[2] = sizes[4];
|
— | — | @@ -3394,7 +3394,7 @@ |
3395 | 3395 | This->ext->glUniform1i(This->shaders->shaders[progtype].pal,9);
|
3396 | 3396 | glUtil_SetTexture(This->util,8,texture);
|
3397 | 3397 | glUtil_SetTexture(This->util,9,paltex);
|
3398 | | - if(dxglcfg.scalingfilter || (This->firstscalex != 1.0f) || (This->firstscaley != 1.0f))
|
| 3398 | + if(dxglcfg.scalingfilter || (This->postsizex != 1.0f) || (This->postsizey != 1.0f))
|
3399 | 3399 | {
|
3400 | 3400 | glRenderer__DrawBackbuffer(This,&texture,texture->bigwidth,texture->bigheight,progtype,TRUE,TRUE);
|
3401 | 3401 | ShaderManager_SetShader(This->shaders,PROG_TEXTURE,NULL,0);
|
— | — | @@ -3405,7 +3405,7 @@ |
3406 | 3406 | }
|
3407 | 3407 | else
|
3408 | 3408 | {
|
3409 | | - if ((This->firstscalex != 1.0f) || (This->firstscaley != 1.0f))
|
| 3409 | + if ((This->postsizex != 1.0f) || (This->postsizey != 1.0f))
|
3410 | 3410 | {
|
3411 | 3411 | progtype = PROG_TEXTURE;
|
3412 | 3412 | ShaderManager_SetShader(This->shaders, PROG_TEXTURE, NULL, 0);
|
— | — | @@ -3732,18 +3732,18 @@ |
3733 | 3733 | glRenderer__SetSwap(This,0);
|
3734 | 3734 | glUtil_SetViewport(This->util, 0, 0, width, height);
|
3735 | 3735 | }
|
3736 | | - if (_isnan(dxglcfg.firstscalex) || _isnan(dxglcfg.firstscaley) ||
|
3737 | | - (dxglcfg.firstscalex < 0.25f) || (dxglcfg.firstscaley < 0.25f))
|
| 3736 | + if (_isnan(dxglcfg.postsizex) || _isnan(dxglcfg.postsizey) ||
|
| 3737 | + (dxglcfg.postsizex < 0.25f) || (dxglcfg.postsizey < 0.25f))
|
3738 | 3738 | {
|
3739 | | - if (width <= 400) This->firstscalex = 2.0f;
|
3740 | | - else This->firstscaley = 1.0f;
|
3741 | | - if (height <= 300) This->firstscaley = 2.0f;
|
3742 | | - else This->firstscaley = 1.0f;
|
| 3739 | + if (width <= 400) This->postsizex = 2.0f;
|
| 3740 | + else This->postsizex = 1.0f;
|
| 3741 | + if (height <= 300) This->postsizey = 2.0f;
|
| 3742 | + else This->postsizey = 1.0f;
|
3743 | 3743 | }
|
3744 | 3744 | else
|
3745 | 3745 | {
|
3746 | | - This->firstscalex = dxglcfg.firstscalex;
|
3747 | | - This->firstscaley = dxglcfg.firstscaley;
|
| 3746 | + This->postsizex = dxglcfg.postsizex;
|
| 3747 | + This->postsizey = dxglcfg.postsizey;
|
3748 | 3748 | }
|
3749 | 3749 | SetEvent(This->busy);
|
3750 | 3750 | }
|
Index: ddraw/glRenderer.h |
— | — | @@ -159,7 +159,7 @@ |
160 | 160 | DWORD last_fvf;
|
161 | 161 | GLsizei fvf_stride;
|
162 | 162 | BOOL mode_3d;
|
163 | | - float firstscalex, firstscaley;
|
| 163 | + float postsizex, postsizey;
|
164 | 164 | } glRenderer;
|
165 | 165 |
|
166 | 166 | HRESULT glRenderer_AddCommand(glRenderer *This, QueueCmd *cmd, BOOL inner, BOOL wait);
|
Index: ddraw/trace.c |
— | — | @@ -1082,6 +1082,7 @@ |
1083 | 1083 | }
|
1084 | 1084 | WriteFile(outfile,");\r\n",4,&byteswritten,NULL);
|
1085 | 1085 | trace_depth++;
|
| 1086 | + va_end(args);
|
1086 | 1087 | LeaveCriticalSection(&trace_cs);
|
1087 | 1088 | }
|
1088 | 1089 | void trace_exit(const char *function, int argtype, void *arg)
|
Index: dxgl-example.ini |
— | — | @@ -0,0 +1,377 @@ |
| 2 | +; Example configuration for DXGL
|
| 3 | +; Place in the same folder as a game or application and rename to dxgl.ini
|
| 4 | +; in order to pre-set profile settings for the game or application.
|
| 5 | +
|
| 6 | +[system]
|
| 7 | +; NoWriteRegistry - Boolean
|
| 8 | +; If true, do not write a profile or settings to the user's registry.
|
| 9 | +; Set to true if distributing the DXGL ddraw.dll with a game or application.
|
| 10 | +; Default is false so ensure the following line is set to avoid writing to
|
| 11 | +; the end user's registry.
|
| 12 | +NoWriteRegistry = true
|
| 13 | +
|
| 14 | +[display]
|
| 15 | +; ScalingMode - Integer
|
| 16 | +; Determines the method DXGL will use to scale full screen modes.
|
| 17 | +; Default is 0.
|
| 18 | +; The following values are valid:
|
| 19 | +; 0 - Change display mode to match requested mode.
|
| 20 | +; 1 - Stretch output to desktop
|
| 21 | +; 2 - Stretch output to desktop, preserving aspect ratio
|
| 22 | +; 3 - Center output on desktop
|
| 23 | +; 4 - Change display mode, stretch if matching mode not found
|
| 24 | +; 5 - Change display mode, aspect corrected stretch if matching mode not found
|
| 25 | +; 6 - Change display mode, center if matching mode not found
|
| 26 | +; 7 - Crop output to desktop, preserving aspect ratio
|
| 27 | +ScalingMode = 0
|
| 28 | +
|
| 29 | +; FullscreenWindowMode - Integer
|
| 30 | +; Determines how DXGL will draw the window for fullscreen modes.
|
| 31 | +; Some modes will override the scaling mode.
|
| 32 | +; The following values are valid:
|
| 33 | +; 0 - Use exclusive fullscreen
|
| 34 | +; 1 - Use non-exclusive fullscreen, not quite borderless windowed mode
|
| 35 | +; 2 - Use a non-resizable window
|
| 36 | +; 3 - Use a resizable window, uses scaler mode, preferably 1, 2, 3, or 7
|
| 37 | +; 4 - Use a borderless, non-resizable window, called windowed borderless in industry
|
| 38 | +FullscreenWindowMode = 0
|
| 39 | +
|
| 40 | +; ChangeColorDepth - Boolean
|
| 41 | +; If true, Windows will attempt to change the color depth of the screen.
|
| 42 | +; This will prevent 8-bit color modes from working correctly in Windows 7
|
| 43 | +; or earlier. In Windows 8 or later, a compatibility mode must be set to
|
| 44 | +; make low color depths work, but in those operating systems 8-bit color
|
| 45 | +; will work.
|
| 46 | +; DXGL always performs color depth conversion for DirectDraw internally
|
| 47 | +; via the OpenGL runtime regardless of the operating system's display mode.
|
| 48 | +; Default is false and is recommended except in special circumstances.
|
| 49 | +ChangeColorDepth = false
|
| 50 | +
|
| 51 | +; AllColorDepths - Boolean
|
| 52 | +; Adds 8, 16, 24, and 32-bit color modes if they are not already
|
| 53 | +; added to the list of display modes passed to the program.
|
| 54 | +; (future)Equivalent to setting AddColorDepths to 29.
|
| 55 | +; (future)Overridden by AddColorDepths.
|
| 56 | +; Default is true if Windows 8 or higher is detected, false otherwise.
|
| 57 | +AllColorDepths = true
|
| 58 | +
|
| 59 | +; AddColorDepths - Integer
|
| 60 | +; (future) Adds additional color modes if they are not already
|
| 61 | +; added to the list of display modes passed to the program.
|
| 62 | +; This is a bit-mapped variable, add up the desired color depths from
|
| 63 | +; the list of values below:
|
| 64 | +; 1 - Add 8-bit modes
|
| 65 | +; 2 - Add 15-bit modes
|
| 66 | +; 4 - Add 16-bit modes
|
| 67 | +; 8 - Add 24-bit modes
|
| 68 | +; 16 - Add 32-bit modes
|
| 69 | +; Default is 29 if Windows 8 or higher is detected, 0 otherwise.
|
| 70 | +; Adding both 15 and 16 bit modes at the same time may cause
|
| 71 | +; crashes or undefined behavior in some programs.
|
| 72 | +AddColorDepths = 29
|
| 73 | +
|
| 74 | +; ExtraModes - Boolean
|
| 75 | +; Adds additional video modes to the list of resolutions.
|
| 76 | +; If a display scaling mode is not set and postprocess scaling
|
| 77 | +; is set to automatic, it will add several low resolution pixel doubled
|
| 78 | +; video modes.
|
| 79 | +; Default is true.
|
| 80 | +; (future)Equivalent to setting AddModes to 7. Overridden by AddModes.
|
| 81 | +ExtraModes = true
|
| 82 | +
|
| 83 | +; AddModes - Integer
|
| 84 | +; (future) Adds additional video modes to the list of resolutions.
|
| 85 | +; This is a bitmapped variable, add up the desired mode lists from
|
| 86 | +; the list of values below:
|
| 87 | +; 0 - None
|
| 88 | +; 1 - Add common low-resolution modes
|
| 89 | +; 2 - Add less common low-resolution modes
|
| 90 | +; 4 - Add uncommon standard definition modes
|
| 91 | +; 8 - Add high definition modes
|
| 92 | +; 16 - Add QHD to UHD modes.
|
| 93 | +; 32 - Add over-4K UHD modes. Check GPU specifications before enabling.
|
| 94 | +; 64 - Add very uncommon resolutions of all dimensions.
|
| 95 | +; Default is 1.
|
| 96 | +AddModes = 1
|
| 97 | +
|
| 98 | +; SortModes - Integer
|
| 99 | +; Determines whether or not to sort display modes by either
|
| 100 | +; resolution first or color depth first. This can make in-game
|
| 101 | +; display mode menus display video modes in increasing order instead
|
| 102 | +; of potentially in a random assortment.
|
| 103 | +; The following values are valid:
|
| 104 | +; 0 - Do not sort. Display modes detected by the system will be listed in
|
| 105 | +; the order they appear. Display modes added by DXGL will be added at
|
| 106 | +; the end.
|
| 107 | +; 1 - Sort video modes, grouping by color depth.
|
| 108 | +; 2 - Sort video modes, grouping by resolution.
|
| 109 | +; Default is 0.
|
| 110 | +SortModes = 0
|
| 111 | +
|
| 112 | +[scaling]
|
| 113 | +; ScalingFilter - Integer
|
| 114 | +; Selects the filter to be used to scale the output image
|
| 115 | +; Default is 0
|
| 116 | +; The following values are valid:
|
| 117 | +; 0 - Nearest-neighbor stretching
|
| 118 | +; 1 - Bilinear interpolation
|
| 119 | +ScalingFilter = 0
|
| 120 | +
|
| 121 | +; AdjustPrimaryResolution - Integer
|
| 122 | +; Determines whether or not to resize the buffers used to hold the primary
|
| 123 | +; buffers if scaling is enabled. Enabling this may cause graphical glitches
|
| 124 | +; and/or slowdown.
|
| 125 | +; The following values are valid:
|
| 126 | +; 0 - Use native primary surface size. Most compatible.
|
| 127 | +; 1 - Adjust primary surface size to match display.
|
| 128 | +; The following will be added in the future:
|
| 129 | +; 2 - Adjust primary surface to nearest integer multiple of native.
|
| 130 | +; 3 - Use exact 1.5x scale.
|
| 131 | +; 4 - Use exact 2x scale.
|
| 132 | +; 5 - Use exact 2.5x scale.
|
| 133 | +; 6 - Use exact 3x scale.
|
| 134 | +; 7 - Use exact 4x scale.
|
| 135 | +; 8 - Use custom scale.
|
| 136 | +; Default is 0.
|
| 137 | +AdjustPrimaryResolution = 0
|
| 138 | +
|
| 139 | +; PrimaryScaleX - Floating point
|
| 140 | +; (future) Sets the scaling amount in the X dimension for custom primary
|
| 141 | +; buffer scaling.
|
| 142 | +; If zero, negative, or an invalid value, will be interpreted as 1.0
|
| 143 | +; Default is 1.0
|
| 144 | +PrimaryScaleX = 1.0
|
| 145 | +
|
| 146 | +; PrimaryScaleY - Floating point
|
| 147 | +; (future) Sets the scaling amount in the Y dimension for custom primary
|
| 148 | +; buffer scaling.
|
| 149 | +; If zero, negative, or an invalid value, will be interpreted as 1.0
|
| 150 | +; Default is 1.0
|
| 151 | +PrimaryScaleY = 1.0
|
| 152 | +
|
| 153 | +; ScreenAspect - Floating point or string
|
| 154 | +; Sets the aspect ratio of the display output.
|
| 155 | +; May be entered as a floating point number or as aspect ratio notation.
|
| 156 | +; Examples would be 1.33333 or 4:3 for a "fullscreen" aspect ratio.
|
| 157 | +; Or "Default" may be entered to use the default aspect for the selected mode.
|
| 158 | +; If zero, negative, "Default" or an invalid value, the display will default
|
| 159 | +; to a 1:1 PAR except on specific low-resolution modes which may use 2:1 or
|
| 160 | +; 1:2 PAR.
|
| 161 | +; Default is "Default"
|
| 162 | +ScreenAspect = Default
|
| 163 | +
|
| 164 | +; DPIScale - Integer
|
| 165 | +; Overrides Windows DPI scaling on high-DPI modes.
|
| 166 | +; Has no effect on Windows XP or earlier, or if "Windows XP style DPI Scaling"
|
| 167 | +; is enabled in Windows, or if the Desktop Window Manager is disabled.
|
| 168 | +; Setting to 0 allows Windows to control high-DPI scaling, which may cause
|
| 169 | +; glitches.
|
| 170 | +; Setting to 1 causes DXGL to use the SetDPIAwareness API on Windows 8.1 or
|
| 171 | +; higher to set the process as Per-Monitor High DPI Aware, or on Windows Vista
|
| 172 | +; through 8.0 use the SetProcessDPIAware API to set the process as High DPI
|
| 173 | +; Aware. If the GUI is initialized before ddraw.dll is loaded, this will have
|
| 174 | +; no effect.
|
| 175 | +; Setting to 2 will adjust the Windows Application Compatibility registry
|
| 176 | +; values to disable Windows High DPI scaling. This may cause your application
|
| 177 | +; or game to restart as the registry value is set. Use this mode only if
|
| 178 | +; setting DPIScale to 1 has no effect.
|
| 179 | +; Default is 1.
|
| 180 | +DPIScale = 1
|
| 181 | +
|
| 182 | +[postprocess]
|
| 183 | +; PostprocessFilter - Integer
|
| 184 | +; Selects the filter to use for the postprocess pass.
|
| 185 | +; (future)If a post processing shader is selected this will be clamped to 1
|
| 186 | +; or overridden by the shader metadata.
|
| 187 | +; This will be ignored if there is no
|
| 188 | +; The following values are valid:
|
| 189 | +; 0 - Nearest-neighbor stretching
|
| 190 | +; 1 - Bilinear interpolation
|
| 191 | +PostprocessFilter = 0
|
| 192 | +
|
| 193 | +; PostprocessScaleX - Floating point
|
| 194 | +; Scaling in the X direction for the postprocess pass.
|
| 195 | +; May be overridden by metadata in a postprocess shader.
|
| 196 | +; If either X or Y are set to 0 or less than 0.25 DXGL will select a scaling
|
| 197 | +; amount that doubles the width if it is 400 or fewer pixels wide, and doubles
|
| 198 | +; the lines if the height is 300 or fewer lines.
|
| 199 | +; Default is 0.0
|
| 200 | +PostprocessScaleX = 0.0
|
| 201 | +
|
| 202 | +; PostprocessScaleY - Floating point
|
| 203 | +; Scaling in the Y direction for the postprocess pass.
|
| 204 | +; May be overridden by metadata in a postprocess shader.
|
| 205 | +; If either X or Y are set to 0 or less than 0.25 DXGL will select a scaling
|
| 206 | +; amount that doubles the width if it is 400 or fewer pixels wide, and doubles
|
| 207 | +; the lines if the height is 300 or fewer lines.
|
| 208 | +; Default is 0.0
|
| 209 | +PostprocessScaleY = 0.0
|
| 210 | +
|
| 211 | +; EnableShader - Boolean
|
| 212 | +; (future) If true, uses a custom shader to render the postprocess pass.
|
| 213 | +; Default is false
|
| 214 | +EnableShader = false
|
| 215 | +
|
| 216 | +; ShaderFile
|
| 217 | +; (future)Path to a file containing either a GLSL fragment shader or a
|
| 218 | +; to-be-determined metadata file containing a shader pipeline and certain
|
| 219 | +; parameters.
|
| 220 | +; The path can be relative (will search the Shaders subdirectory of the
|
| 221 | +; install directory and the path where the ddraw.dll implementation has been
|
| 222 | +; placed) or absolute.
|
| 223 | +; Default is undefined.
|
| 224 | +; ShaderFile = example.fs
|
| 225 | +
|
| 226 | +[d3d]
|
| 227 | +; TextureFilter - Integer
|
| 228 | +; Texture filtering method for Direct3D draw commands.
|
| 229 | +; The following values are valid:
|
| 230 | +; 0 - Use the setting in the Direct3D texture stage state
|
| 231 | +; 1 - GL_NEAREST (Nearest-neighbor filtering)
|
| 232 | +; 2 - GL_LINEAR (Bilinear filtering)
|
| 233 | +; 3 - GL_NEAREST_MIPMAP_NEAREST (Nearest-neighbor with mipmap)
|
| 234 | +; 4 - GL_NEAREST_MIPMAP_LINEAR (Nearest-neighbor with linear mipmap)
|
| 235 | +; 5 - GL_LINEAR_MIPMAP_NEAREST (Bilinear with mipmap)
|
| 236 | +; 6 - GL_LINEAR_MIPMAP_LINEAR (Trilinear filtering)
|
| 237 | +; Default is 0
|
| 238 | +TextureFilter = 0
|
| 239 | +
|
| 240 | +; AnisotropicFiltering - Integer
|
| 241 | +; (future) Enabled anisotropic filtering to improve display quality
|
| 242 | +; May cause slowdown on older, low-end graphics cards in some situations.
|
| 243 | +; The following values are valid, though larger values may be dependent
|
| 244 | +; on the capabilities of the graphics card:
|
| 245 | +; 0 - Use the setting in the Direct3D texture stage state
|
| 246 | +; 1 - Disables anisotropic filtering.
|
| 247 | +; 2 - Sets anisotropic filtering to 2x.
|
| 248 | +; 4 - Sets anisotropic filtering to 4x.
|
| 249 | +; 8 - Sets anisotropic filtering to 8x.
|
| 250 | +; 16 - Sets anisotropic filtering to 16x.
|
| 251 | +AnisotropicFiltering = 0
|
| 252 | +
|
| 253 | +; Antialiasing - Hexadecimal integer
|
| 254 | +; (future) Enables multisample antialiasing. May cause significant
|
| 255 | +; slowdown, especially on slower graphics cards.
|
| 256 | +; The following values are valid on all graphics cards:
|
| 257 | +; 0x0 - Enables antialiasing if requested by the D3D device.
|
| 258 | +; 0x1 - Disables antialiasing
|
| 259 | +; For enabling antialiasing, run DXGLCFG to enumerate the available
|
| 260 | +; antialiasing modes for your graphics card. Then retrieve the value
|
| 261 | +; from the registry.
|
| 262 | +; You may also use a number from 0x2 to 0xff to enable standard OpenGL
|
| 263 | +; multisampling.
|
| 264 | +; Add 0x10000 to the number to enable the specific antialiasing mode only
|
| 265 | +; when the application requests it.
|
| 266 | +; Default is 0x0
|
| 267 | +Antialiasing = 0x0
|
| 268 | +
|
| 269 | +; D3DAspect - Integer
|
| 270 | +; (future)Selects whether or not to adjust the aspect ratio for Direct3D
|
| 271 | +; content. Also known as widescreen hack.
|
| 272 | +; Only active if the display scaling is set to "Stretch to screen"
|
| 273 | +; The following values are valid:
|
| 274 | +; 0 - Stretches the output to the screen.
|
| 275 | +; 1 - Expands the viewable area, i.e. hor+. There may be missing geometry
|
| 276 | +; off-screen.
|
| 277 | +; 2 - Crops the display to the viewable area. May cut off parts of the game
|
| 278 | +; graphics.
|
| 279 | +; Default is 0
|
| 280 | +D3DAspect = 0
|
| 281 | +
|
| 282 | +[advanced]
|
| 283 | +; VSync - Integer
|
| 284 | +; Determines vertical retrace behavior.
|
| 285 | +; This option is reserved for future expansion, and the only valid value is
|
| 286 | +; currently 0.
|
| 287 | +VSync = 0
|
| 288 | +
|
| 289 | +; TextureFormat - Integer
|
| 290 | +; Determines the internal format to use for textures and DirectDraw
|
| 291 | +; surfaces.
|
| 292 | +; This option is reserved for future expansion, and the only valid value is
|
| 293 | +; currently 0.
|
| 294 | +TextureFormat = 0
|
| 295 | +
|
| 296 | +; TexUpload - Integer
|
| 297 | +; Determines the method used to upload texture data to the graphics card.
|
| 298 | +; This option is reserved for future expansion, and the only valid value is
|
| 299 | +; currently 0.
|
| 300 | +TexUpload = 0
|
| 301 | +
|
| 302 | +[debug]
|
| 303 | +; DebugNoExtFramebuffer - Boolean
|
| 304 | +; Disables use of the EXT_framebuffer_object OpenGL extension.
|
| 305 | +; WARNING: If this is enabled and either ARB_framebuffer_object is
|
| 306 | +; unavailable or DebugNoArbFramebuffer is enabled, then DXGL will fail
|
| 307 | +; to initialize.
|
| 308 | +; Default is false
|
| 309 | +DebugNoExtFramebuffer = false
|
| 310 | +
|
| 311 | +; DebugNoArbFramebuffer - Boolean
|
| 312 | +; Disables use of the ARB_framebuffer_object OpenGL extension.
|
| 313 | +; WARNING: If this is enabled and either EXT_framebuffer_object is
|
| 314 | +; unavailable or DebugNoExtFramebuffer is enabled, then DXGL will fail
|
| 315 | +; to initialize.
|
| 316 | +; Default is false
|
| 317 | +DebugNoArbFramebuffer = false
|
| 318 | +
|
| 319 | +; DebugNoES2Compatibility - Boolean
|
| 320 | +; Disables use of the ARB_ES2_compatibility OpenGL extension.
|
| 321 | +; Currently this means that GL_RGB565 16-bit internal texture format
|
| 322 | +; will not be used.
|
| 323 | +; Default is false
|
| 324 | +DebugNoES2Compatibility = false
|
| 325 | +
|
| 326 | +; DebugNoExtDirectStateAccess - Boolean
|
| 327 | +; Disables use of the EXT_direct_state_access OpenGL extension.
|
| 328 | +; This extension allows DXGL to more easily manipulate texture and other
|
| 329 | +; objects. Disabling direct state access will revert to a more traditional
|
| 330 | +; approach to manipulating OpenGL objects.
|
| 331 | +; Default is false
|
| 332 | +DebugNoExtDirectStateAccess = false
|
| 333 | +
|
| 334 | +; DebugNoArbDirectStateAccess - Boolean
|
| 335 | +; Disables use of the ARB_direct_state_access OpenGL extension.
|
| 336 | +; This extension allows DXGL to more easily manipulate texture and other
|
| 337 | +; objects. Disabling direct state access will revert to a more traditional
|
| 338 | +; approach to manipulating OpenGL objects.
|
| 339 | +; Default is false
|
| 340 | +DebugNoArbDirectStateAccess = false
|
| 341 | +
|
| 342 | +; DebugNoSamplerObjects - Boolean
|
| 343 | +; Disables use of sampler objects. Disabling sampler objects may reduce
|
| 344 | +; the performance and accuracy of Direct3D commands.
|
| 345 | +; Default is false
|
| 346 | +DebugNoSamplerObjects = false
|
| 347 | +
|
| 348 | +; DebugNoGpuShader4 - Boolean
|
| 349 | +; Disables use of the EXT_gpu_shader4 OpenGL extension.
|
| 350 | +; Disabling this extension may reduce the accuracy of DirectDraw drawing
|
| 351 | +; commands. This has no effect on OpenGL 3.0 or later as this functionality
|
| 352 | +; is in core.
|
| 353 | +; In addition disabling GLSL 1.30 and EXT_gpu_shader4 will disable DirectDraw
|
| 354 | +; ROP support.
|
| 355 | +; Default is false.
|
| 356 | +DebugNoGpuShader4 = false
|
| 357 | +
|
| 358 | +; DebugNoGLSL130 - Boolean
|
| 359 | +; Disables use of GLSL 1.30 shaders. Enabling this parameter as well as
|
| 360 | +; DebugNoGpuShader4 will disable integer processing of DirectDraw commands
|
| 361 | +; as well as disabling DirectDraw ROP support.
|
| 362 | +; Default is false
|
| 363 | +DebugNoGLSL130 = false
|
| 364 | +
|
| 365 | +; DebugMaxGLVersionMajor - Integer
|
| 366 | +; Determines the maximum OpenGL major version available to DXGL.
|
| 367 | +; If the system has a lower OpenGL version that will take precedence.
|
| 368 | +; If this value is 0 than DXGL will use the highest OpenGL version
|
| 369 | +; available to the system and ignore DebugMaxGLVersionMinor.
|
| 370 | +; Default is 0
|
| 371 | +DebugMaxGLVersionMajor = 0
|
| 372 | +
|
| 373 | +; DebugMaxGLVersionMinor - Integer
|
| 374 | +; Determines the maximum OpenGL minor version available to DXGL.
|
| 375 | +; This will be ignored if the system OpenGL major version is less than
|
| 376 | +; DebugMaxGLVersionMajor.
|
| 377 | +; Default is 0
|
| 378 | +DebugMaxGLVersionMinor = 0
|
Index: dxglcfg/dxglcfg.c |
— | — | @@ -679,7 +679,7 @@ |
680 | 680 | SendDlgItemMessage(hWnd, IDC_PRESCALE, CB_ADDSTRING, 0, (LPARAM)buffer);
|
681 | 681 | _tcscpy(buffer, _T("Bilinear"));
|
682 | 682 | SendDlgItemMessage(hWnd, IDC_PRESCALE, CB_ADDSTRING, 1, (LPARAM)buffer);
|
683 | | - SendDlgItemMessage(hWnd, IDC_PRESCALE, CB_SETCURSEL, cfg->firstscalefilter, 0);
|
| 683 | + SendDlgItemMessage(hWnd, IDC_PRESCALE, CB_SETCURSEL, cfg->postfilter, 0);
|
684 | 684 | // first scaling sizes
|
685 | 685 | _tcscpy(buffer, _T("Auto"));
|
686 | 686 | SendDlgItemMessage(hWnd, IDC_PRESCALESIZE, CB_ADDSTRING, 0, (LPARAM)buffer);
|
— | — | @@ -693,8 +693,8 @@ |
694 | 694 | SendDlgItemMessage(hWnd, IDC_PRESCALESIZE, CB_ADDSTRING, 0, (LPARAM)buffer);
|
695 | 695 | _tcscpy(buffer, _T("4x"));
|
696 | 696 | SendDlgItemMessage(hWnd, IDC_PRESCALESIZE, CB_ADDSTRING, 0, (LPARAM)buffer);
|
697 | | - Set1stScaleCombo(hWnd, IDC_PRESCALESIZE, cfg->firstscalex, cfg->firstscaley,
|
698 | | - cfgmask->firstscalex, cfgmask->firstscaley, tristate);
|
| 697 | + Set1stScaleCombo(hWnd, IDC_PRESCALESIZE, cfg->postsizex, cfg->postsizey,
|
| 698 | + cfgmask->postsizex, cfgmask->postsizey, tristate);
|
699 | 699 | // final scaling filter
|
700 | 700 | _tcscpy(buffer,_T("Nearest"));
|
701 | 701 | SendDlgItemMessage(hWnd,IDC_SCALE,CB_ADDSTRING,0,(LPARAM)buffer);
|
— | — | @@ -1183,7 +1183,7 @@ |
1184 | 1184 | // Read settings into controls
|
1185 | 1185 | SetCombo(hWnd,IDC_VIDMODE,cfg->scaler,cfgmask->scaler,tristate);
|
1186 | 1186 | SetCombo(hWnd,IDC_SORTMODES,cfg->SortModes,cfgmask->SortModes,tristate);
|
1187 | | - SetCombo(hWnd,IDC_PRESCALE,cfg->firstscalefilter,cfgmask->firstscalefilter,tristate);
|
| 1187 | + SetCombo(hWnd,IDC_PRESCALE,cfg->postfilter,cfgmask->postfilter,tristate);
|
1188 | 1188 | SetCombo(hWnd,IDC_SCALE,cfg->scalingfilter,cfgmask->scalingfilter,tristate);
|
1189 | 1189 | //SetCombo(hWnd,IDC_VSYNC,cfg->vsync,cfgmask->vsync,tristate);
|
1190 | 1190 | SetCombo(hWnd,IDC_FULLMODE,cfg->fullmode,cfgmask->fullmode,tristate);
|
— | — | @@ -1198,8 +1198,8 @@ |
1199 | 1199 | SetCombo(hWnd,IDC_TEXUPLOAD,cfg->TexUpload,cfgmask->TexUpload,tristate);
|
1200 | 1200 | SetCheck(hWnd,IDC_EXTRAMODES,cfg->AddModes,cfgmask->AddModes,tristate);
|
1201 | 1201 | SetCombo(hWnd, IDC_DPISCALE, cfg->DPIScale, cfgmask->DPIScale, tristate);
|
1202 | | - Set1stScaleCombo(hWnd, IDC_PRESCALESIZE, cfg->firstscalex, cfg->firstscaley,
|
1203 | | - cfgmask->firstscalex, cfgmask->firstscaley, tristate);
|
| 1202 | + Set1stScaleCombo(hWnd, IDC_PRESCALESIZE, cfg->postsizex, cfg->postsizey,
|
| 1203 | + cfgmask->postsizex, cfgmask->postsizey, tristate);
|
1204 | 1204 | SetAspectCombo(hWnd, IDC_ASPECT, cfg->aspect, cfgmask->aspect, tristate);
|
1205 | 1205 | }
|
1206 | 1206 | break;
|
— | — | @@ -1214,7 +1214,7 @@ |
1215 | 1215 | *dirty = TRUE;
|
1216 | 1216 | break;
|
1217 | 1217 | case IDC_PRESCALE:
|
1218 | | - cfg->firstscalefilter = GetCombo(hWnd,IDC_PRESCALE,&cfgmask->firstscalefilter);
|
| 1218 | + cfg->postfilter = GetCombo(hWnd,IDC_PRESCALE,&cfgmask->postfilter);
|
1219 | 1219 | EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
|
1220 | 1220 | *dirty = TRUE;
|
1221 | 1221 | break;
|
— | — | @@ -1291,17 +1291,17 @@ |
1292 | 1292 | case IDC_PRESCALESIZE:
|
1293 | 1293 | if (HIWORD(wParam) == CBN_KILLFOCUS)
|
1294 | 1294 | {
|
1295 | | - Get1stScaleCombo(hWnd, IDC_PRESCALESIZE, &cfg->firstscalex, &cfg->firstscaley,
|
1296 | | - &cfgmask->firstscalex, &cfgmask->firstscaley);
|
1297 | | - Set1stScaleCombo(hWnd, IDC_PRESCALESIZE, cfg->firstscalex, cfg->firstscaley,
|
1298 | | - cfgmask->firstscalex, cfgmask->firstscaley, tristate);
|
| 1295 | + Get1stScaleCombo(hWnd, IDC_PRESCALESIZE, &cfg->postsizex, &cfg->postsizey,
|
| 1296 | + &cfgmask->postsizex, &cfgmask->postsizey);
|
| 1297 | + Set1stScaleCombo(hWnd, IDC_PRESCALESIZE, cfg->postsizex, cfg->postsizey,
|
| 1298 | + cfgmask->postsizex, cfgmask->postsizey, tristate);
|
1299 | 1299 | EnableWindow(GetDlgItem(hWnd, IDC_APPLY), TRUE);
|
1300 | 1300 | *dirty = TRUE;
|
1301 | 1301 | }
|
1302 | 1302 | else if (HIWORD(wParam) == CBN_SELCHANGE)
|
1303 | 1303 | {
|
1304 | | - Get1stScaleCombo(hWnd, IDC_PRESCALESIZE, &cfg->firstscalex, &cfg->firstscaley,
|
1305 | | - &cfgmask->firstscalex, &cfgmask->firstscaley);
|
| 1304 | + Get1stScaleCombo(hWnd, IDC_PRESCALESIZE, &cfg->postsizex, &cfg->postsizey,
|
| 1305 | + &cfgmask->postsizex, &cfgmask->postsizey);
|
1306 | 1306 | EnableWindow(GetDlgItem(hWnd, IDC_APPLY), TRUE);
|
1307 | 1307 | *dirty = TRUE;
|
1308 | 1308 | }
|
Index: dxglcfg2/dxglcfg2.c |
— | — | @@ -911,7 +911,7 @@ |
912 | 912 | SendDlgItemMessage(hTabs[0], IDC_PRESCALE, CB_ADDSTRING, 0, (LPARAM)buffer);
|
913 | 913 | _tcscpy(buffer, _T("Bilinear"));
|
914 | 914 | SendDlgItemMessage(hTabs[0], IDC_PRESCALE, CB_ADDSTRING, 1, (LPARAM)buffer);
|
915 | | - SendDlgItemMessage(hWnd, IDC_PRESCALE, CB_SETCURSEL, cfg->firstscalefilter, 0);
|
| 915 | + SendDlgItemMessage(hWnd, IDC_PRESCALE, CB_SETCURSEL, cfg->postfilter, 0);
|
916 | 916 | // first scaling sizes
|
917 | 917 | _tcscpy(buffer, _T("Auto"));
|
918 | 918 | SendDlgItemMessage(hTabs[0], IDC_PRESCALESIZE, CB_ADDSTRING, 0, (LPARAM)buffer);
|
— | — | @@ -925,8 +925,8 @@ |
926 | 926 | SendDlgItemMessage(hTabs[0], IDC_PRESCALESIZE, CB_ADDSTRING, 0, (LPARAM)buffer);
|
927 | 927 | _tcscpy(buffer, _T("4x"));
|
928 | 928 | SendDlgItemMessage(hTabs[0], IDC_PRESCALESIZE, CB_ADDSTRING, 0, (LPARAM)buffer);
|
929 | | - Set1stScaleCombo(hWnd, IDC_PRESCALESIZE, cfg->firstscalex, cfg->firstscaley,
|
930 | | - cfgmask->firstscalex, cfgmask->firstscaley, tristate);
|
| 929 | + Set1stScaleCombo(hWnd, IDC_PRESCALESIZE, cfg->postsizex, cfg->postsizey,
|
| 930 | + cfgmask->postsizex, cfgmask->postsizey, tristate);
|
931 | 931 | // final scaling filter
|
932 | 932 | _tcscpy(buffer,_T("Nearest"));
|
933 | 933 | SendDlgItemMessage(hTabs[0], IDC_SCALE, CB_ADDSTRING, 0, (LPARAM)buffer);
|