Index: cfgmgr/ReadMe.txt |
— | — | @@ -12,6 +12,25 @@ |
13 | 13 | Does not have a registry value.
|
14 | 14 | If nonzero, ignores registry settings from Global section of registry.
|
15 | 15 |
|
| 16 | +member NoOverwrite
|
| 17 | +INI Entry NoOverwrite
|
| 18 | +INI Group system
|
| 19 | +Does not have a registry value.
|
| 20 | +If true, prevents DXGL Config from overwriting an existing ddraw.dll
|
| 21 | +
|
| 22 | +member BundledDDrawSHA256
|
| 23 | +INI Entry BundledDDrawSHA256
|
| 24 | +INI Group system
|
| 25 | +Does not have a registry value.
|
| 26 | +If set, specifies the original copy of ddraw.dll in the game folder for
|
| 27 | +backup purposes.
|
| 28 | +
|
| 29 | +member NoUninstall
|
| 30 | +INI Entry NoUninstall
|
| 31 | +INI Group system
|
| 32 | +Does not have a registry value.
|
| 33 | +If true, prevents DXGL Config from deleting ddraw.dll from the game folder.
|
| 34 | +
|
16 | 35 | Member scaler
|
17 | 36 | INI Entry ScalingMode
|
18 | 37 | INI Group display
|
— | — | @@ -53,7 +72,8 @@ |
54 | 73 | INI Entry AllColorDepths
|
55 | 74 | INI Group display
|
56 | 75 | REG_DWORD HKCU\DXGL\Profiles\<app>\AllColorDepths
|
57 | | -[DEPRECATED FOR DXGLCFG2]Enable all color depths, even if unsupported by the system
|
| 76 | +[DEPRECATED]Enable all color depths, even if unsupported by the system.
|
| 77 | +Overridden by AddColorDepths
|
58 | 78 | Valid settings:
|
59 | 79 | 0 - Off
|
60 | 80 | 1 - On
|
— | — | @@ -76,7 +96,8 @@ |
77 | 97 | INI Entry ExtraModes
|
78 | 98 | INI Group display
|
79 | 99 | REG_DWORD HKCU\DXGL\Profiles\<app>\ExtraModes
|
80 | | -[DEPRECATED FOR DXGLCFG2]Enable extra video modes, even if unsupported by the system
|
| 100 | +[DEPRECATED]Enable extra video modes, even if unsupported by the system
|
| 101 | +Overridden by AddModes
|
81 | 102 | Valid settings:
|
82 | 103 | 0 - Off
|
83 | 104 | 1 - On
|
— | — | @@ -185,7 +206,6 @@ |
186 | 207 | 7 - Use exact 4x scale.
|
187 | 208 | 8 - Use custom scale.
|
188 | 209 |
|
189 | | -(future)
|
190 | 210 | Member primaryscalex
|
191 | 211 | INI Entry PrimaryScaleX
|
192 | 212 | INI Group scaling
|
— | — | @@ -194,12 +214,11 @@ |
195 | 215 | Stored as a 32-bit float encoded as a DWORD.
|
196 | 216 | If zero, negative, or an invalid value, set to 1.
|
197 | 217 |
|
198 | | -(future)
|
199 | 218 | Member primaryscaley
|
200 | 219 | INI Entry PrimaryScaleY
|
201 | 220 | INI Group scaling
|
202 | 221 | REG_DWORD HKCU\DXGL\Profiles\<app>\PrimaryScaleY
|
203 | | -Custom X scale for primary scaling.
|
| 222 | +Custom Y scale for primary scaling.
|
204 | 223 | Stored as a 32-bit float encoded as a DWORD.
|
205 | 224 | If zero, negative, or an invalid value, set to 1.
|
206 | 225 |
|
— | — | @@ -221,8 +240,10 @@ |
222 | 241 | disabled.
|
223 | 242 | Valid settings:
|
224 | 243 | 0 - Disabled
|
225 | | -1 - Enabled
|
226 | | -2 - Use Windows AppCompat
|
| 244 | +1 - Per-monitor on Windows 8.1 and up, system on Windows Vista through 8.0
|
| 245 | +2 - Override with Windows AppCompat
|
| 246 | +3 - System DPI
|
| 247 | +4 - Per-monitor V2 on Windows 10 v1703 and up
|
227 | 248 |
|
228 | 249 | Member postfilter
|
229 | 250 | INI Entry PostprocessFilter
|
— | — | @@ -365,6 +386,63 @@ |
366 | 387 | REG_DWORD HKCU\DXGL\Profiles\<app>\SingleBufferDevice
|
367 | 388 | If true, do not use double buffering in OpenGL.
|
368 | 389 |
|
| 390 | +Member WindowPosition
|
| 391 | +INI Entry WindowPosition
|
| 392 | +INI Group advanced
|
| 393 | +REG_DWORD HKCU\DXGL\Profiles\<app>\WindowPosition
|
| 394 | +Selects the position to place the window in forced-window mode
|
| 395 | +Valid settings:
|
| 396 | +0 - Center
|
| 397 | +1 - Remembered position
|
| 398 | +
|
| 399 | +Member RememberWindowSize
|
| 400 | +INI Entry RememberWindowSize
|
| 401 | +INI Group advanced
|
| 402 | +REG_DWORD HKCU\DXGL\Profiles\<app>\RememberWindowSize
|
| 403 | +If true, remembers the size of the window in forced-window mode.
|
| 404 | +
|
| 405 | +Member RememberWindowPosition
|
| 406 | +INI Entry RememberWindowPosition
|
| 407 | +INI Group advanced
|
| 408 | +REG_DWORD HKCU\DXGL\Profiles\<app>\RememberWindowPosition
|
| 409 | +If true, remembers the position of the window in forced-window mode.
|
| 410 | +
|
| 411 | +Member NoResizeWindow
|
| 412 | +INI Entry NoResizeWindow
|
| 413 | +INI Group advanced
|
| 414 | +REG_DWORD HKCU\DXGL\Profiles\<app>\NoResizeWindow
|
| 415 | +If true, prevents the window from resizing in resizable window mode.
|
| 416 | +
|
| 417 | +Member WindowX
|
| 418 | +INI Entry WindowX
|
| 419 | +INI Group advanced
|
| 420 | +REG_DWORD HKCU\DXGL\Profiles\<app>\WindowX
|
| 421 | +Remembered X position of window in forced-window mode.
|
| 422 | +
|
| 423 | +Member WindowY
|
| 424 | +INI Entry WindowY
|
| 425 | +INI Group advanced
|
| 426 | +REG_DWORD HKCU\DXGL\Profiles\<app>\WindowY
|
| 427 | +Remembered Y position of window in forced-window mode.
|
| 428 | +
|
| 429 | +Member WindowWidth
|
| 430 | +INI Entry WindowWidth
|
| 431 | +INI Group advanced
|
| 432 | +REG_DWORD HKCU\DXGL\Profiles\<app>\WindowWidth
|
| 433 | +Remembered width of window in forced-window mode.
|
| 434 | +
|
| 435 | +Member WindowHeight
|
| 436 | +INI Entry WindowHeight
|
| 437 | +INI Group advanced
|
| 438 | +REG_DWORD HKCU\DXGL\Profiles\<app>\WindowHeight
|
| 439 | +Remembered height of window in forced-window mode.
|
| 440 | +
|
| 441 | +Member WindowMaximized
|
| 442 | +INI Entry WindowMaximized
|
| 443 | +INI Group advanced
|
| 444 | +REG_DWORD HKCU\DXGL\Profiles\<app>\WindowMaximized
|
| 445 | +If true, resizable window mode starts maximized.
|
| 446 | +
|
369 | 447 | Default for all Debug variables is 0 or FALSE.
|
370 | 448 |
|
371 | 449 | Member DebugNoExtFramebuffer
|
Index: cfgmgr/cfgmgr.c |
— | — | @@ -645,6 +645,7 @@ |
646 | 646 | cfg->NoResizeWindow = ReadBool(hKey, cfg->NoResizeWindow, &cfgmask->NoResizeWindow, _T("NoResizeWindow"));
|
647 | 647 | cfg->WindowWidth = ReadDWORD(hKey, cfg->WindowWidth, &cfgmask->WindowWidth, _T("WindowWidth"));
|
648 | 648 | cfg->WindowHeight = ReadDWORD(hKey, cfg->WindowHeight, &cfgmask->WindowHeight, _T("WindowHeight"));
|
| 649 | + cfg->WindowMaximized = ReadDWORD(hKey, cfg->WindowMaximized, &cfgmask->WindowMaximized, _T("WindowMaximized"));
|
649 | 650 | ReadWindowPos(hKey, cfg, cfgmask);
|
650 | 651 | cfg->Windows8Detected = ReadBool(hKey,cfg->Windows8Detected,&cfgmask->Windows8Detected,_T("Windows8Detected"));
|
651 | 652 | cfg->DPIScale = ReadDWORD(hKey,cfg->DPIScale,&cfgmask->DPIScale,_T("DPIScale"));
|
— | — | @@ -793,6 +794,7 @@ |
794 | 795 | WriteDWORD(hKey, cfg->WindowY, cfgmask->WindowY, _T("WindowY"));
|
795 | 796 | WriteDWORD(hKey, cfg->WindowWidth, cfgmask->WindowWidth, _T("WindowWidth"));
|
796 | 797 | WriteDWORD(hKey, cfg->WindowHeight, cfgmask->WindowHeight, _T("WindowHeight"));
|
| 798 | + WriteDWORD(hKey, cfg->WindowMaximized, cfgmask->WindowMaximized, _T("WindowMaximized"));
|
797 | 799 | WriteBool(hKey,cfg->Windows8Detected,cfgmask->Windows8Detected,_T("Windows8Detected"));
|
798 | 800 | WriteDWORD(hKey,cfg->DPIScale,cfgmask->DPIScale,_T("DPIScale"));
|
799 | 801 | WriteFloat(hKey, cfg->aspect, cfgmask->aspect, _T("ScreenAspect"));
|
— | — | @@ -1058,6 +1060,7 @@ |
1059 | 1061 | if (!stricmp(name, "WindowY")) cfg->WindowY = INIIntValue(value);
|
1060 | 1062 | if (!stricmp(name, "WindowWidth")) cfg->WindowWidth = INIIntValue(value);
|
1061 | 1063 | if (!stricmp(name, "WindowHeight")) cfg->WindowHeight = INIIntValue(value);
|
| 1064 | + if (!stricmp(name, "WindowMaximized")) cfg->WindowMaximized = INIIntValue(value);
|
1062 | 1065 | }
|
1063 | 1066 | if (!stricmp(section, "debug"))
|
1064 | 1067 | {
|
— | — | @@ -1347,6 +1350,7 @@ |
1348 | 1351 | {
|
1349 | 1352 | WriteDWORD(hKey, cfg->WindowWidth, 1, _T("WindowWidth"));
|
1350 | 1353 | WriteDWORD(hKey, cfg->WindowHeight, 1, _T("WindowHeight"));
|
| 1354 | + WriteDWORD(hKey, cfg->WindowMaximized, 1, _T("WindowMaximized"));
|
1351 | 1355 | }
|
1352 | 1356 | RegCloseKey(hKey);
|
1353 | 1357 | }
|
Index: cfgmgr/cfgmgr.h |
— | — | @@ -75,6 +75,7 @@ |
76 | 76 | DWORD WindowY;
|
77 | 77 | DWORD WindowWidth;
|
78 | 78 | DWORD WindowHeight;
|
| 79 | + BOOL WindowMaximized;
|
79 | 80 | // [debug]
|
80 | 81 | BOOL DebugNoExtFramebuffer;
|
81 | 82 | BOOL DebugNoArbFramebuffer;
|
Index: ddraw/glRenderer.cpp |
— | — | @@ -1668,6 +1668,7 @@ |
1669 | 1669 | void glRenderer_Init(glRenderer *This, int width, int height, int bpp, BOOL fullscreen, unsigned int frequency, HWND hwnd, glDirectDraw7 *glDD7, BOOL devwnd)
|
1670 | 1670 | {
|
1671 | 1671 | RECT wndrect;
|
| 1672 | + WINDOWPLACEMENT wndplace;
|
1672 | 1673 | int screenx, screeny;
|
1673 | 1674 | LONG_PTR winstyle, winstyleex;
|
1674 | 1675 | This->oldswap = 0;
|
— | — | @@ -1755,8 +1756,13 @@ |
1756 | 1757 | wndrect.top = (screeny / 2) - (dxglcfg.WindowHeight / 2);
|
1757 | 1758 | }
|
1758 | 1759 | AdjustWindowRectEx(&wndrect, winstyle | WS_OVERLAPPEDWINDOW, FALSE, (winstyleex | WS_EX_APPWINDOW));
|
1759 | | - SetWindowPos(This->hWnd, 0, wndrect.left, wndrect.top, wndrect.right - wndrect.left,
|
1760 | | - wndrect.bottom - wndrect.top, SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
|
| 1760 | + wndplace.length = sizeof(WINDOWPLACEMENT);
|
| 1761 | + GetWindowPlacement(This->hWnd, &wndplace);
|
| 1762 | + wndplace.flags = WPF_ASYNCWINDOWPLACEMENT;
|
| 1763 | + if (dxglcfg.WindowMaximized == 1) wndplace.showCmd = SW_SHOWMAXIMIZED;
|
| 1764 | + else wndplace.showCmd = SW_SHOWNORMAL;
|
| 1765 | + wndplace.rcNormalPosition = wndrect;
|
| 1766 | + SetWindowPlacement(This->hWnd, &wndplace);
|
1761 | 1767 | break;
|
1762 | 1768 | case 4: // Windowed borderless
|
1763 | 1769 | winstyle = GetWindowLongPtrA(This->hWnd, GWL_STYLE);
|
— | — | @@ -1830,12 +1836,15 @@ |
1831 | 1837 | BOOL hasmenu;
|
1832 | 1838 | RECT wndrect;
|
1833 | 1839 | LONG_PTR winstyle, winstyleex;
|
| 1840 | + WINDOWPLACEMENT wndplace;
|
1834 | 1841 | switch (dxglcfg.fullmode)
|
1835 | 1842 | {
|
1836 | 1843 | case 2:
|
1837 | 1844 | case 3:
|
1838 | 1845 | case 4:
|
1839 | | - GetWindowRect(This->hWnd, &wndrect);
|
| 1846 | + wndplace.length = sizeof(WINDOWPLACEMENT);
|
| 1847 | + GetWindowPlacement(This->hWnd, &wndplace);
|
| 1848 | + wndrect = wndplace.rcNormalPosition;
|
1840 | 1849 | if (dxglcfg.fullmode != 4)
|
1841 | 1850 | {
|
1842 | 1851 | winstyle = GetWindowLongPtrA(This->hWnd, GWL_STYLE);
|
— | — | @@ -1848,6 +1857,11 @@ |
1849 | 1858 | dxglcfg.WindowY = wndrect.top;
|
1850 | 1859 | dxglcfg.WindowWidth = wndrect.right - wndrect.left;
|
1851 | 1860 | dxglcfg.WindowHeight = wndrect.bottom - wndrect.top;
|
| 1861 | + if (dxglcfg.fullmode == 3)
|
| 1862 | + {
|
| 1863 | + if (wndplace.showCmd == SW_MAXIMIZE) dxglcfg.WindowMaximized = TRUE;
|
| 1864 | + else dxglcfg.WindowMaximized = FALSE;
|
| 1865 | + }
|
1852 | 1866 | SaveWindowSettings(&dxglcfg);
|
1853 | 1867 | break;
|
1854 | 1868 | default:
|
— | — | @@ -2142,7 +2156,8 @@ |
2143 | 2157 | */
|
2144 | 2158 | void glRenderer_SetWnd(glRenderer *This, int width, int height, int bpp, int fullscreen, unsigned int frequency, HWND newwnd, BOOL devwnd)
|
2145 | 2159 | {
|
2146 | | - RECT wndrect;
|
| 2160 | + RECT wndrect, wndrect2;
|
| 2161 | + WINDOWPLACEMENT wndplace;
|
2147 | 2162 | BOOL hasmenu;
|
2148 | 2163 | int screenx, screeny;
|
2149 | 2164 | LONG_PTR winstyle, winstyleex;
|
— | — | @@ -2210,18 +2225,34 @@ |
2211 | 2226 | winstyleex = GetWindowLongPtrA(newwnd, GWL_EXSTYLE);
|
2212 | 2227 | SetWindowLongPtrA(newwnd, GWL_EXSTYLE, winstyleex | WS_EX_APPWINDOW);
|
2213 | 2228 | SetWindowLongPtrA(newwnd, GWL_STYLE, (winstyle | WS_OVERLAPPEDWINDOW) & ~WS_POPUP);
|
2214 | | - ShowWindow(newwnd, SW_NORMAL);
|
| 2229 | + wndplace.length = sizeof(WINDOWPLACEMENT);
|
| 2230 | + GetWindowPlacement(newwnd, &wndplace);
|
| 2231 | + if(wndplace.showCmd == SW_SHOWMAXIMIZED) ShowWindow(newwnd, SW_SHOWMAXIMIZED);
|
| 2232 | + else ShowWindow(newwnd, SW_NORMAL);
|
2215 | 2233 | if (dxglcfg.WindowPosition == 1)
|
2216 | 2234 | {
|
2217 | | - GetWindowRect(newwnd, &wndrect);
|
| 2235 | + wndrect = wndplace.rcNormalPosition;
|
| 2236 | + GetWindowRect(newwnd, &wndrect2);
|
2218 | 2237 | if (GetMenu(newwnd)) hasmenu = TRUE;
|
2219 | 2238 | else hasmenu = FALSE;
|
2220 | 2239 | UnadjustWindowRectEx(&wndrect, (winstyle | WS_OVERLAPPEDWINDOW) & ~WS_POPUP,
|
2221 | 2240 | hasmenu, (winstyleex | WS_EX_APPWINDOW));
|
| 2241 | + UnadjustWindowRectEx(&wndrect2, (winstyle | WS_OVERLAPPEDWINDOW) & ~WS_POPUP,
|
| 2242 | + hasmenu, (winstyleex | WS_EX_APPWINDOW));
|
2222 | 2243 | }
|
2223 | 2244 | else
|
2224 | 2245 | {
|
2225 | | - if (dxglcfg.NoResizeWindow) break;
|
| 2246 | + if (dxglcfg.NoResizeWindow)
|
| 2247 | + {
|
| 2248 | + GetWindowRect(newwnd, &wndrect2);
|
| 2249 | + if (GetMenu(newwnd)) hasmenu = TRUE;
|
| 2250 | + else hasmenu = FALSE;
|
| 2251 | + UnadjustWindowRectEx(&wndrect2, (winstyle | WS_OVERLAPPEDWINDOW) & ~WS_POPUP,
|
| 2252 | + hasmenu, (winstyleex | WS_EX_APPWINDOW));
|
| 2253 | + glDirectDraw7_SetWindowSize(This->ddInterface,
|
| 2254 | + wndrect2.right - wndrect2.left, wndrect2.bottom - wndrect2.top);
|
| 2255 | + break;
|
| 2256 | + }
|
2226 | 2257 | screenx = GetSystemMetrics(SM_CXSCREEN);
|
2227 | 2258 | screeny = GetSystemMetrics(SM_CYSCREEN);
|
2228 | 2259 | wndrect.left = (screenx / 2) - (width / 2);
|
— | — | @@ -2232,15 +2263,17 @@ |
2233 | 2264 | wndrect.right = wndrect.left + width;
|
2234 | 2265 | wndrect.bottom = wndrect.top + height;
|
2235 | 2266 | }
|
2236 | | - else glDirectDraw7_SetWindowSize(This->ddInterface, wndrect.right - wndrect.left,
|
2237 | | - wndrect.bottom - wndrect.top);
|
2238 | 2267 | dxglcfg.WindowX = wndrect.left;
|
2239 | 2268 | dxglcfg.WindowY = wndrect.top;
|
2240 | 2269 | dxglcfg.WindowWidth = wndrect.right - wndrect.left;
|
2241 | 2270 | dxglcfg.WindowHeight = wndrect.bottom - wndrect.top;
|
2242 | 2271 | AdjustWindowRectEx(&wndrect, winstyle | WS_OVERLAPPEDWINDOW, FALSE, (winstyleex | WS_EX_APPWINDOW));
|
2243 | | - SetWindowPos(newwnd, 0, wndrect.left, wndrect.top, wndrect.right - wndrect.left,
|
2244 | | - wndrect.bottom - wndrect.top, SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
|
| 2272 | + wndplace.flags = WPF_ASYNCWINDOWPLACEMENT;
|
| 2273 | + if (!dxglcfg.NoResizeWindow) wndplace.showCmd = SW_SHOWNORMAL;
|
| 2274 | + wndplace.rcNormalPosition = wndrect;
|
| 2275 | + SetWindowPlacement(newwnd, &wndplace);
|
| 2276 | + if(dxglcfg.NoResizeWindow) glDirectDraw7_SetWindowSize(This->ddInterface,
|
| 2277 | + wndrect2.right - wndrect2.left, wndrect2.bottom - wndrect2.top);
|
2245 | 2278 | SaveWindowSettings(&dxglcfg);
|
2246 | 2279 | break;
|
2247 | 2280 | case 4: // Windowed borderless
|
Index: dxgl-example.ini |
— | — | @@ -96,8 +96,8 @@ |
97 | 97 | ; AllColorDepths - Boolean
|
98 | 98 | ; Adds 8, 16, 24, and 32-bit color modes if they are not already
|
99 | 99 | ; added to the list of display modes passed to the program.
|
100 | | -; (future)Equivalent to setting AddColorDepths to 21.
|
101 | | -; (future)Overridden by AddColorDepths.
|
| 100 | +; Equivalent to setting AddColorDepths to 21.
|
| 101 | +; Overridden by AddColorDepths.
|
102 | 102 | ; Default is true if Windows 8 or higher is detected, false otherwise.
|
103 | 103 | AllColorDepths = true
|
104 | 104 |
|
— | — | @@ -122,11 +122,11 @@ |
123 | 123 | ; is set to automatic, it will add several low resolution pixel doubled
|
124 | 124 | ; video modes.
|
125 | 125 | ; Default is true.
|
126 | | -; (future)Equivalent to setting AddModes to 7. Overridden by AddModes.
|
| 126 | +; Equivalent to setting AddModes to 7. Overridden by AddModes.
|
127 | 127 | ExtraModes = true
|
128 | 128 |
|
129 | 129 | ; AddModes - Integer
|
130 | | -; (future) Adds additional video modes to the list of resolutions.
|
| 130 | +; Adds additional video modes to the list of resolutions.
|
131 | 131 | ; This is a bitmapped variable, add up the desired mode lists from
|
132 | 132 | ; the list of values below:
|
133 | 133 | ; 0 - None
|
— | — | @@ -473,6 +473,11 @@ |
474 | 474 | ; Default is 480
|
475 | 475 | WindowHeight = 480
|
476 | 476 |
|
| 477 | +; WindowMaximized - Boolean
|
| 478 | +; Remembered maximized state of the window when using resized window mode.
|
| 479 | +; Default is false
|
| 480 | +WindowMaximized = false
|
| 481 | +
|
477 | 482 | [debug]
|
478 | 483 | ; DebugNoExtFramebuffer - Boolean
|
479 | 484 | ; Disables use of the EXT_framebuffer_object OpenGL extension.
|
Index: dxglcfg/dxglcfg.cpp |
— | — | @@ -2036,6 +2036,11 @@ |
2037 | 2037 | SetInteger(hWnd, IDC_WINDOWHEIGHT, cfg->WindowHeight, cfgmask->WindowHeight);
|
2038 | 2038 | }
|
2039 | 2039 | break;
|
| 2040 | + case IDC_WINDOWMAXIMIZED:
|
| 2041 | + cfg->WindowMaximized = GetCheck(hWnd, IDC_WINDOWMAXIMIZED, &cfgmask->WindowMaximized);
|
| 2042 | + EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
|
| 2043 | + *dirty = TRUE;
|
| 2044 | + break;
|
2040 | 2045 | case IDC_NOAUTOSIZE:
|
2041 | 2046 | cfg->NoResizeWindow = GetCheck(hWnd, IDC_NOAUTOSIZE, &cfgmask->NoResizeWindow);
|
2042 | 2047 | EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
|
— | — | @@ -2988,6 +2993,9 @@ |
2989 | 2994 | // Remembered window size
|
2990 | 2995 | SetInteger(hTabs[3], IDC_WINDOWWIDTH, cfg->WindowWidth, cfgmask->WindowWidth);
|
2991 | 2996 | SetInteger(hTabs[3], IDC_WINDOWHEIGHT, cfg->WindowHeight, cfgmask->WindowHeight);
|
| 2997 | + // Remembered maximize state
|
| 2998 | + if (cfg->WindowMaximized) SendDlgItemMessage(hTabs[3], IDC_WINDOWMAXIMIZED, BM_SETCHECK, BST_CHECKED, 0);
|
| 2999 | + else SendDlgItemMessage(hTabs[3], IDC_WINDOWMAXIMIZED, BM_SETCHECK, BST_UNCHECKED, 0);
|
2992 | 3000 | // No autosize
|
2993 | 3001 | if (cfg->NoResizeWindow) SendDlgItemMessage(hTabs[3], IDC_NOAUTOSIZE, BM_SETCHECK, BST_CHECKED, 0);
|
2994 | 3002 | else SendDlgItemMessage(hTabs[3], IDC_NOAUTOSIZE, BM_SETCHECK, BST_UNCHECKED, 0);
|
— | — | @@ -3388,6 +3396,7 @@ |
3389 | 3397 | SendDlgItemMessage(hTabs[3], IDC_WINDOWPOS, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
3390 | 3398 | SendDlgItemMessage(hTabs[3], IDC_REMEMBERWINDOWPOS, BM_SETSTYLE, BS_AUTO3STATE, TRUE);
|
3391 | 3399 | SendDlgItemMessage(hTabs[3], IDC_REMEMBERWINDOWSIZE, BM_SETSTYLE, BS_AUTO3STATE, TRUE);
|
| 3400 | + SendDlgItemMessage(hTabs[3], IDC_WINDOWMAXIMIZED, BM_SETSTYLE, BS_AUTO3STATE, TRUE);
|
3392 | 3401 | SendDlgItemMessage(hTabs[3], IDC_NOAUTOSIZE, BM_SETSTYLE, BS_AUTO3STATE, TRUE);
|
3393 | 3402 | // Debug tab
|
3394 | 3403 | SendDlgItemMessage(hTabs[4], IDC_GLVERSION, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
— | — | @@ -3447,6 +3456,7 @@ |
3448 | 3457 | SendDlgItemMessage(hTabs[3], IDC_WINDOWPOS, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
3449 | 3458 | SendDlgItemMessage(hTabs[3], IDC_REMEMBERWINDOWPOS, BM_SETSTYLE, BS_AUTOCHECKBOX, TRUE);
|
3450 | 3459 | SendDlgItemMessage(hTabs[3], IDC_REMEMBERWINDOWSIZE, BM_SETSTYLE, BS_AUTOCHECKBOX, TRUE);
|
| 3460 | + SendDlgItemMessage(hTabs[3], IDC_WINDOWMAXIMIZED, BM_SETSTYLE, BS_AUTOCHECKBOX, TRUE);
|
3451 | 3461 | SendDlgItemMessage(hTabs[3], IDC_NOAUTOSIZE, BM_SETSTYLE, BS_AUTOCHECKBOX, TRUE);
|
3452 | 3462 | // Debug tab
|
3453 | 3463 | SendDlgItemMessage(hTabs[3], IDC_GLVERSION, CB_DELETESTRING,
|
— | — | @@ -3544,6 +3554,7 @@ |
3545 | 3555 | SetInteger(hTabs[3], IDC_WINDOWY, cfg->WindowY, cfgmask->WindowY);
|
3546 | 3556 | SetInteger(hTabs[3], IDC_WINDOWWIDTH, cfg->WindowWidth, cfgmask->WindowWidth);
|
3547 | 3557 | SetInteger(hTabs[3], IDC_WINDOWHEIGHT, cfg->WindowHeight, cfgmask->WindowHeight);
|
| 3558 | + SetCheck(hTabs[3], IDC_WINDOWMAXIMIZED, cfg->WindowMaximized, cfgmask->WindowMaximized, tristate);
|
3548 | 3559 | SetCheck(hTabs[3], IDC_NOAUTOSIZE, cfg->NoResizeWindow, cfgmask->NoResizeWindow, tristate);
|
3549 | 3560 | // Debug tab
|
3550 | 3561 | RedrawWindow(GetDlgItem(hTabs[4], IDC_DEBUGLIST), NULL, NULL, RDW_INVALIDATE);
|
Index: dxglcfg/dxglcfg.rc |
— | — | @@ -128,7 +128,8 @@ |
129 | 129 | EDITTEXT IDC_WINDOWWIDTH, 122, 69, 40, 14, ES_AUTOHSCROLL, WS_EX_LEFT
|
130 | 130 | LTEXT "H", IDC_STATIC, 164, 72, 6, 9, SS_LEFT, WS_EX_LEFT
|
131 | 131 | EDITTEXT IDC_WINDOWHEIGHT, 172, 69, 40, 14, ES_AUTOHSCROLL, WS_EX_LEFT
|
132 | | - AUTOCHECKBOX "Don't auto-size window in resizable window mode", IDC_NOAUTOSIZE, 7, 88, 171, 8, 0, WS_EX_LEFT
|
| 132 | + AUTOCHECKBOX "Start resizable window maximized", IDC_WINDOWMAXIMIZED, 7, 88, 120, 8, 0, WS_EX_LEFT
|
| 133 | + AUTOCHECKBOX "Don't auto-size window in resizable window mode", IDC_NOAUTOSIZE, 7, 101, 171, 8, 0, WS_EX_LEFT
|
133 | 134 | LTEXT "Installation path", IDC_PATHLABEL, 7, 124, 51, 9, SS_LEFT, WS_EX_LEFT
|
134 | 135 | EDITTEXT IDC_PROFILEPATH, 7, 135, 331, 14, NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL | ES_READONLY, WS_EX_LEFT
|
135 | 136 | PUSHBUTTON "Write INI file...", IDC_WRITEINI, 262, 150, 73, 14, 0, WS_EX_LEFT
|
Index: dxglcfg/resource.h |
— | — | @@ -112,10 +112,11 @@ |
113 | 113 | #define IDC_WINDOWY 2309
|
114 | 114 | #define IDC_WINDOWWIDTH 2310
|
115 | 115 | #define IDC_WINDOWHEIGHT 2311
|
116 | | -#define IDC_NOAUTOSIZE 2312
|
117 | | -#define IDC_PATHLABEL 2313
|
118 | | -#define IDC_PROFILEPATH 2314
|
119 | | -#define IDC_WRITEINI 2315
|
| 116 | +#define IDC_WINDOWMAXIMIZED 2312
|
| 117 | +#define IDC_NOAUTOSIZE 2313
|
| 118 | +#define IDC_PATHLABEL 2314
|
| 119 | +#define IDC_PROFILEPATH 2315
|
| 120 | +#define IDC_WRITEINI 2316
|
120 | 121 |
|
121 | 122 | // Controls - Debug Tab
|
122 | 123 | #define IDC_DEBUGLIST 2401
|