Index: dxglcfg/dxglcfg.cpp |
— | — | @@ -1951,6 +1951,36 @@ |
1952 | 1952 | return TRUE;
|
1953 | 1953 | }
|
1954 | 1954 |
|
| 1955 | +LRESULT CALLBACK SaveINICallback(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
| 1956 | +{
|
| 1957 | + switch(Msg)
|
| 1958 | + {
|
| 1959 | + case WM_INITDIALOG:
|
| 1960 | + SendDlgItemMessage(hWnd, IDC_NOWRITEREGISTRY, BM_SETCHECK, BST_CHECKED, 0);
|
| 1961 | + SendDlgItemMessage(hWnd, IDC_OVERRIDEREGISTRY, BM_SETCHECK, BST_UNCHECKED, 0);
|
| 1962 | + SendDlgItemMessage(hWnd, IDC_NOOVERWRITE, BM_SETCHECK, BST_UNCHECKED, 0);
|
| 1963 | + SendDlgItemMessage(hWnd, IDC_SAVESHA256, BM_SETCHECK, BST_CHECKED, 0);
|
| 1964 | + SendDlgItemMessage(hWnd, IDC_NOUNINSTALL, BM_SETCHECK, BST_CHECKED, 0);
|
| 1965 | + return TRUE;
|
| 1966 | + case WM_COMMAND:
|
| 1967 | + switch (LOWORD(wParam))
|
| 1968 | + {
|
| 1969 | + case IDOK:
|
| 1970 | + EndDialog(hWnd, IDOK);
|
| 1971 | + return TRUE;
|
| 1972 | + case IDCANCEL:
|
| 1973 | + EndDialog(hWnd, IDCANCEL);
|
| 1974 | + return TRUE;
|
| 1975 | + default:
|
| 1976 | + break;
|
| 1977 | + }
|
| 1978 | + return FALSE;
|
| 1979 | + default:
|
| 1980 | + return FALSE;
|
| 1981 | + }
|
| 1982 | + return TRUE;
|
| 1983 | +}
|
| 1984 | +
|
1955 | 1985 | LRESULT CALLBACK AdvancedTabCallback(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
1956 | 1986 | {
|
1957 | 1987 | switch (Msg)
|
— | — | @@ -2061,6 +2091,9 @@ |
2062 | 2092 | EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
|
2063 | 2093 | *dirty = TRUE;
|
2064 | 2094 | break;
|
| 2095 | + case IDC_WRITEINI:
|
| 2096 | + DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_SAVEINI), hWnd, (DLGPROC)SaveINICallback);
|
| 2097 | + break;
|
2065 | 2098 | default:
|
2066 | 2099 | break;
|
2067 | 2100 | }
|
— | — | @@ -2612,6 +2645,8 @@ |
2613 | 2646 | DWORD dpisupport;
|
2614 | 2647 | TCITEM tab;
|
2615 | 2648 | HWND hProgressWnd;
|
| 2649 | + WNDCLASSEX wndclass;
|
| 2650 | + HWND hTempWnd;
|
2616 | 2651 | switch (Msg)
|
2617 | 2652 | {
|
2618 | 2653 | case WM_INITDIALOG:
|
— | — | @@ -2619,6 +2654,24 @@ |
2620 | 2655 | CreateThread(NULL, 0, ProgressThread, &hProgressWnd, 0, NULL);
|
2621 | 2656 | while (hProgressWnd == NULL) Sleep(10);
|
2622 | 2657 | hDialog = hWnd;
|
| 2658 | + ZeroMemory(&wndclass, sizeof(WNDCLASSEX));
|
| 2659 | + wndclass.cbSize = sizeof(WNDCLASSEX);
|
| 2660 | + wndclass.lpfnWndProc = DefWindowProc;
|
| 2661 | + wndclass.hInstance = GetModuleHandle(NULL);
|
| 2662 | + wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
|
| 2663 | + wndclass.hbrBackground = (HBRUSH)COLOR_WINDOW;
|
| 2664 | + wndclass.lpszClassName = _T("DXGLConfigDlgPosition");
|
| 2665 | + RegisterClassEx(&wndclass);
|
| 2666 | + GetWindowRect(hWnd, &r);
|
| 2667 | + hTempWnd = CreateWindow(_T("DXGLConfigDlgPosition"), _T("DXGL Config"),
|
| 2668 | + DS_3DLOOK | DS_CONTEXTHELP | DS_SHELLFONT | WS_CAPTION | WS_SYSMENU,
|
| 2669 | + CW_USEDEFAULT, CW_USEDEFAULT, r.right-r.left,r.bottom-r.top,NULL,NULL,
|
| 2670 | + GetModuleHandle(NULL), NULL);
|
| 2671 | + error = GetLastError();
|
| 2672 | + GetWindowRect(hTempWnd, &r);
|
| 2673 | + SetWindowPos(hWnd, HWND_TOP,r.left,r.top,0,0, SWP_NOSIZE);
|
| 2674 | + DestroyWindow(hTempWnd);
|
| 2675 | + UnregisterClass(_T("DXGLConfigDlgPosition"), GetModuleHandle(NULL));
|
2623 | 2676 | tristate = FALSE;
|
2624 | 2677 | maxapps = 128;
|
2625 | 2678 | apps = (app_setting *)malloc(maxapps*sizeof(app_setting));
|
Index: dxglcfg/dxglcfg.rc |
— | — | @@ -133,8 +133,7 @@ |
134 | 134 | AUTOCHECKBOX "Capture mouse in window mode (Press Ctrl+Alt to release)", IDC_CAPTUREMOUSE, 7, 114, 196, 8, 0, WS_EX_LEFT
|
135 | 135 | LTEXT "Installation path", IDC_PATHLABEL, 7, 124, 51, 9, SS_LEFT, WS_EX_LEFT
|
136 | 136 | EDITTEXT IDC_PROFILEPATH, 7, 135, 331, 14, NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL | ES_READONLY, WS_EX_LEFT
|
137 | | - // Removed for DXGL 0.5.13 release
|
138 | | - // PUSHBUTTON "Write INI file...", IDC_WRITEINI, 262, 150, 73, 14, 0, WS_EX_LEFT
|
| 137 | + PUSHBUTTON "Write INI file...", IDC_WRITEINI, 262, 150, 73, 14, 0, WS_EX_LEFT
|
139 | 138 | }
|
140 | 139 |
|
141 | 140 |
|
— | — | @@ -259,6 +258,24 @@ |
260 | 259 |
|
261 | 260 |
|
262 | 261 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
| 262 | +IDD_SAVEINI DIALOG 0, 0, 186, 95
|
| 263 | +STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
|
| 264 | +CAPTION "Save .ini File"
|
| 265 | +FONT 8, "Ms Shell Dlg"
|
| 266 | +{
|
| 267 | + AUTOCHECKBOX "Don't write application profile to registry", IDC_NOWRITEREGISTRY, 11, 16, 138, 8, 0, WS_EX_LEFT
|
| 268 | + AUTOCHECKBOX "Override global registry settings", IDC_OVERRIDEREGISTRY, 11, 26, 113, 8, 0, WS_EX_LEFT
|
| 269 | + AUTOCHECKBOX "Prevent DXGL Config from overwriting ddraw.dll", IDC_NOOVERWRITE, 11, 36, 165, 8, 0, WS_EX_LEFT
|
| 270 | + GROUPBOX ".ini file options", 0, 5, 5, 172, 69, 0, WS_EX_LEFT
|
| 271 | + AUTOCHECKBOX "Save SHA-256 signature of existing ddraw.dll", IDC_SAVESHA256, 11, 46, 157, 8, 0, WS_EX_LEFT
|
| 272 | + AUTOCHECKBOX "Prevent DXGL Config from deleting ddraw.dll", IDC_NOUNINSTALL, 11, 56, 156, 8, 0, WS_EX_LEFT
|
| 273 | + PUSHBUTTON "Cancel", IDCANCEL, 131, 76, 50, 14, 0, WS_EX_LEFT
|
| 274 | + DEFPUSHBUTTON "&Save...", IDOK, 76, 76, 50, 14, 0, WS_EX_LEFT
|
| 275 | +}
|
| 276 | +
|
| 277 | +
|
| 278 | +
|
| 279 | +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
263 | 280 | IDD_TEXSHADER DIALOG 0, 0, 487, 317
|
264 | 281 | STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
|
265 | 282 | CAPTION "Texture Shader Demo"
|
Index: dxglcfg/resource.h |
— | — | @@ -25,6 +25,7 @@ |
26 | 26 | #define IDD_TEXSHADER 103
|
27 | 27 | #define IDD_VERTEXSHADER 104
|
28 | 28 | #define IDD_MODELIST 105
|
| 29 | +#define IDD_SAVEINI 106
|
29 | 30 |
|
30 | 31 | // Tabs
|
31 | 32 | #define IDD_DISPLAY 201
|
— | — | @@ -260,3 +261,10 @@ |
261 | 262 |
|
262 | 263 | // Controls - Mode list dialog
|
263 | 264 | #define IDC_MODELIST 3101
|
| 265 | +
|
| 266 | +// Controls - Save .ini file dialog
|
| 267 | +#define IDC_NOWRITEREGISTRY 3201
|
| 268 | +#define IDC_OVERRIDEREGISTRY 3202
|
| 269 | +#define IDC_NOOVERWRITE 3203
|
| 270 | +#define IDC_SAVESHA256 3204
|
| 271 | +#define IDC_NOUNINSTALL 3205
|