DXGL r759 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r758‎ | r759 | r760 >
Date:05:57, 2 December 2017
Author:admin
Status:new
Tags:
Comment:
Mark old DXGL Config as deprecated and new DXGL Config not experimental.
Implement advanced tab in DXGL Config, as far as is implemented.
Implement list box for Debug tab in DXGL Config.
Modified paths:
  • /dxglcfg/dxglcfg.c (modified) (history)
  • /dxglcfg/dxglcfg.rc (modified) (history)
  • /dxglcfg2/dxglcfg2.c (modified) (history)
  • /dxglcfg2/dxglcfg2.rc (modified) (history)
  • /dxglcfg2/resource.h (modified) (history)

Diff [purge]

Index: dxglcfg/dxglcfg.c
@@ -1891,13 +1891,14 @@
18921892 GetDirFromPath(hlppath);
18931893 _tcscat(hlppath,_T("\\dxgl.chm"));
18941894 // Message for when transitioning to the new config UI
1895 - /*MessageBox(NULL, _T("This version of DXGL Config is deprecated and no longer supported. Some options may no longer work correctly."),
1896 - _T("Notice"), MB_OK | MB_ICONWARNING);*/
 1895+ MessageBox(NULL, _T("This version of DXGL Config is deprecated and no longer developed or supported. \
 1896+Some options may no longer work correctly."),
 1897+ _T("Notice"), MB_OK | MB_ICONWARNING);
18971898 hMutex = CreateMutex(NULL, TRUE, _T("DXGLConfigMutex"));
18981899 if (GetLastError() == ERROR_ALREADY_EXISTS)
18991900 {
19001901 // Find DXGL Config window
1901 - hWnd = FindWindow(NULL, _T("DXGL Config"));
 1902+ hWnd = FindWindow(NULL, _T("DXGL Config (DEPRECATED)"));
19021903 // Focus DXGL Config window
19031904 if (hWnd) SetForegroundWindow(hWnd);
19041905 return 0;
Index: dxglcfg/dxglcfg.rc
@@ -30,7 +30,7 @@
3131 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
3232 IDD_DXGLCFG DIALOG 0, 0, 405, 261
3333 STYLE DS_3DLOOK | DS_CONTEXTHELP | DS_SETFONT | WS_CAPTION | WS_SYSMENU
34 -CAPTION "DXGL Config"
 34+CAPTION "DXGL Config (DEPRECATED)"
3535 FONT 8, "Ms Shell Dlg 2"
3636 {
3737 DEFPUSHBUTTON "OK", IDOK, 247, 243, 50, 14, 0, WS_EX_LEFT
Index: dxglcfg2/dxglcfg2.c
@@ -724,7 +724,7 @@
725725 else mask[0] = 0xff;
726726 }
727727
728 -void DrawCheck(HDC hdc, BOOL selected, BOOL checked, BOOL grayed, RECT *r)
 728+void DrawCheck(HDC hdc, BOOL selected, BOOL checked, BOOL grayed, BOOL tristate, RECT *r)
729729 {
730730 if (grayed)
731731 {
@@ -743,6 +743,21 @@
744744 else DrawFrameControl(hdc, r, DFC_BUTTON, DFCS_BUTTONCHECK | DFCS_CHECKED | DFCS_INACTIVE);
745745 }
746746 }
 747+ else if (tristate)
 748+ {
 749+ if (hThemeDisplay)
 750+ {
 751+ if (selected)
 752+ _DrawThemeBackground(hThemeDisplay, hdc, BS_AUTOCHECKBOX, CBS_MIXEDHOT, r, NULL);
 753+ else _DrawThemeBackground(hThemeDisplay, hdc, BS_AUTOCHECKBOX, CBS_MIXEDDISABLED, r, NULL);
 754+ }
 755+ else
 756+ {
 757+ if (selected)
 758+ DrawFrameControl(hdc, r, DFC_BUTTON, DFCS_BUTTON3STATE | DFCS_CHECKED | DFCS_INACTIVE | DFCS_HOT);
 759+ else DrawFrameControl(hdc, r, DFC_BUTTON, DFCS_BUTTON3STATE | DFCS_CHECKED | DFCS_INACTIVE);
 760+ }
 761+ }
747762 else
748763 {
749764 if (hThemeDisplay)
@@ -776,6 +791,21 @@
777792 else DrawFrameControl(hdc, r, DFC_BUTTON, DFCS_BUTTONCHECK | DFCS_CHECKED);
778793 }
779794 }
 795+ else if (tristate)
 796+ {
 797+ if (hThemeDisplay)
 798+ {
 799+ if (selected)
 800+ _DrawThemeBackground(hThemeDisplay, hdc, BS_AUTOCHECKBOX, CBS_MIXEDHOT, r, NULL);
 801+ else _DrawThemeBackground(hThemeDisplay, hdc, BS_AUTOCHECKBOX, CBS_MIXEDNORMAL, r, NULL);
 802+ }
 803+ else
 804+ {
 805+ if (selected)
 806+ DrawFrameControl(hdc, r, DFC_BUTTON, DFCS_BUTTON3STATE | DFCS_CHECKED | DFCS_HOT);
 807+ else DrawFrameControl(hdc, r, DFC_BUTTON, DFCS_BUTTON3STATE | DFCS_CHECKED);
 808+ }
 809+ }
780810 else
781811 {
782812 if (hThemeDisplay)
@@ -858,14 +888,14 @@
859889 if (drawitem->itemID == 5)
860890 {
861891 if(!cfgmask->AddColorDepths)
862 - DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, TRUE, FALSE, &r);
863 - else DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, FALSE, FALSE, &r);
 892+ DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, TRUE, FALSE, FALSE, &r);
 893+ else DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, FALSE, FALSE, FALSE, &r);
864894 }
865895 else
866896 {
867897 if ((cfg->AddColorDepths >> drawitem->itemID) & 1)
868 - DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, TRUE, !cfgmask->AddColorDepths, &r);
869 - else DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, FALSE, !cfgmask->AddColorDepths, &r);
 898+ DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, TRUE, !cfgmask->AddColorDepths, FALSE, &r);
 899+ else DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, FALSE, !cfgmask->AddColorDepths, FALSE, &r);
870900 }
871901 drawitem->rcItem.left += GetSystemMetrics(SM_CXMENUCHECK) + 5;
872902 }
@@ -904,14 +934,14 @@
905935 if (drawitem->itemID == 7)
906936 {
907937 if (!cfgmask->AddModes)
908 - DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, TRUE, FALSE, &r);
909 - else DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, FALSE, FALSE, &r);
 938+ DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, TRUE, FALSE, FALSE, &r);
 939+ else DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, FALSE, FALSE, FALSE, &r);
910940 }
911941 else
912942 {
913943 if ((cfg->AddModes >> drawitem->itemID) & 1)
914 - DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, TRUE, !cfgmask->AddModes, &r);
915 - else DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, FALSE, !cfgmask->AddModes, &r);
 944+ DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, TRUE, !cfgmask->AddModes, FALSE, &r);
 945+ else DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, FALSE, !cfgmask->AddModes, FALSE, &r);
916946 }
917947 drawitem->rcItem.left += GetSystemMetrics(SM_CXMENUCHECK) + 5;
918948 }
@@ -1093,6 +1123,8 @@
10941124 EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
10951125 *dirty = TRUE;
10961126 break;
 1127+ default:
 1128+ break;
10971129 }
10981130 }
10991131 default:
@@ -1147,6 +1179,8 @@
11481180 *dirty = TRUE;
11491181 }
11501182 break;
 1183+ default:
 1184+ break;
11511185 }
11521186 default:
11531187 return FALSE;
@@ -1184,6 +1218,8 @@
11851219 EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
11861220 *dirty = TRUE;
11871221 break;
 1222+ default:
 1223+ break;
11881224 }
11891225 default:
11901226 return FALSE;
@@ -1198,6 +1234,22 @@
11991235 case WM_INITDIALOG:
12001236 if (_EnableThemeDialogTexture) _EnableThemeDialogTexture(hWnd, ETDT_ENABLETAB);
12011237 return TRUE;
 1238+ case WM_COMMAND:
 1239+ switch (LOWORD(wParam))
 1240+ {
 1241+ case IDC_TEXTUREFORMAT:
 1242+ cfg->TextureFormat = GetCombo(hWnd, IDC_TEXTUREFORMAT, &cfgmask->TextureFormat);
 1243+ EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
 1244+ *dirty = TRUE;
 1245+ break;
 1246+ case IDC_TEXUPLOAD:
 1247+ cfg->TexUpload = GetCombo(hWnd, IDC_TEXUPLOAD, &cfgmask->TexUpload);
 1248+ EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
 1249+ *dirty = TRUE;
 1250+ break;
 1251+ default:
 1252+ break;
 1253+ }
12021254 default:
12031255 return FALSE;
12041256 }
@@ -1204,13 +1256,201 @@
12051257 return TRUE;
12061258 }
12071259
 1260+void ReadDebugItem(int item, BOOL *value, BOOL *mask)
 1261+{
 1262+ switch (item)
 1263+ {
 1264+ case 0:
 1265+ *value = cfg->DebugNoExtFramebuffer;
 1266+ *mask = cfgmask->DebugNoExtFramebuffer;
 1267+ break;
 1268+ case 1:
 1269+ *value = cfg->DebugNoArbFramebuffer;
 1270+ *mask = cfgmask->DebugNoArbFramebuffer;
 1271+ break;
 1272+ case 2:
 1273+ *value = cfg->DebugNoES2Compatibility;
 1274+ *mask = cfgmask->DebugNoES2Compatibility;
 1275+ break;
 1276+ case 3:
 1277+ *value = cfg->DebugNoExtDirectStateAccess;
 1278+ *mask = cfgmask->DebugNoExtDirectStateAccess;
 1279+ break;
 1280+ case 4:
 1281+ *value = cfg->DebugNoArbDirectStateAccess;
 1282+ *mask = cfgmask->DebugNoArbDirectStateAccess;
 1283+ break;
 1284+ case 5:
 1285+ *value = cfg->DebugNoSamplerObjects;
 1286+ *mask = cfgmask->DebugNoSamplerObjects;
 1287+ break;
 1288+ case 6:
 1289+ *value = cfg->DebugNoGpuShader4;
 1290+ *mask = cfgmask->DebugNoGpuShader4;
 1291+ break;
 1292+ case 7:
 1293+ *value = cfg->DebugNoGLSL130;
 1294+ *mask = cfgmask->DebugNoGLSL130;
 1295+ break;
 1296+ /*case 8:
 1297+ *value = cfg->DebugDisableErrors;
 1298+ *mask = cfgmask->DebugDisableErrors;
 1299+ break;*/
 1300+ default:
 1301+ *value = FALSE;
 1302+ *mask = FALSE;
 1303+ break;
 1304+ }
 1305+}
 1306+
 1307+void WriteDebugItem(int item, BOOL value, BOOL mask)
 1308+{
 1309+ switch (item)
 1310+ {
 1311+ case 0:
 1312+ cfg->DebugNoExtFramebuffer = value;
 1313+ cfgmask->DebugNoExtFramebuffer = mask;
 1314+ break;
 1315+ case 1:
 1316+ cfg->DebugNoArbFramebuffer = value;
 1317+ cfgmask->DebugNoArbFramebuffer = mask;
 1318+ break;
 1319+ case 2:
 1320+ cfg->DebugNoES2Compatibility = value;
 1321+ cfgmask->DebugNoES2Compatibility = mask;
 1322+ break;
 1323+ case 3:
 1324+ cfg->DebugNoExtDirectStateAccess = value;
 1325+ cfgmask->DebugNoExtDirectStateAccess = mask;
 1326+ break;
 1327+ case 4:
 1328+ cfg->DebugNoArbDirectStateAccess = value;
 1329+ cfgmask->DebugNoArbDirectStateAccess = mask;
 1330+ break;
 1331+ case 5:
 1332+ cfg->DebugNoSamplerObjects = value;
 1333+ cfgmask->DebugNoSamplerObjects = mask;
 1334+ break;
 1335+ case 6:
 1336+ cfg->DebugNoGpuShader4 = value;
 1337+ cfgmask->DebugNoGpuShader4 = mask;
 1338+ break;
 1339+ case 7:
 1340+ cfg->DebugNoGLSL130 = value;
 1341+ cfgmask->DebugNoGLSL130 = mask;
 1342+ break;
 1343+ /*case 8:
 1344+ cfg->DebugDisableErrors = value;
 1345+ cfgmask->DebugDisableErrors = mask;
 1346+ break;*/
 1347+ default:
 1348+ break;
 1349+ }
 1350+}
 1351+
12081352 LRESULT CALLBACK DebugTabCallback(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
12091353 {
 1354+ TCHAR str[64];
 1355+ RECT r;
 1356+ DRAWITEMSTRUCT* drawitem;
 1357+ COLORREF OldTextColor, OldBackColor;
 1358+ BOOL debugvalue, debugmask;
 1359+ DWORD item;
12101360 switch (Msg)
12111361 {
12121362 case WM_INITDIALOG:
12131363 if (_EnableThemeDialogTexture) _EnableThemeDialogTexture(hWnd, ETDT_ENABLETAB);
12141364 return TRUE;
 1365+ case WM_MEASUREITEM:
 1366+ switch (wParam)
 1367+ {
 1368+ case IDC_DEBUGLIST:
 1369+ ((LPMEASUREITEMSTRUCT)lParam)->itemHeight = GetSystemMetrics(SM_CYMENUCHECK);
 1370+ ((LPMEASUREITEMSTRUCT)lParam)->itemWidth = GetSystemMetrics(SM_CXMENUCHECK);
 1371+ break;
 1372+ default:
 1373+ break;
 1374+ }
 1375+ break;
 1376+ case WM_COMMAND:
 1377+ switch (LOWORD(wParam))
 1378+ {
 1379+ case IDC_DEBUGLIST:
 1380+ if ((HIWORD(wParam) == LBN_SELCHANGE) || (HIWORD(wParam) == LBN_DBLCLK))
 1381+ {
 1382+ item = SendDlgItemMessage(hWnd, IDC_DEBUGLIST, LB_GETCURSEL, 0, 0);
 1383+ ReadDebugItem(item, &debugvalue, &debugmask);
 1384+ if (tristate)
 1385+ {
 1386+ if (debugvalue && debugmask)
 1387+ {
 1388+ debugvalue = FALSE;
 1389+ debugmask = FALSE;
 1390+ }
 1391+ else if (!debugmask)
 1392+ {
 1393+ debugvalue = FALSE;
 1394+ debugmask = TRUE;
 1395+ }
 1396+ else
 1397+ {
 1398+ debugvalue = TRUE;
 1399+ debugmask = TRUE;
 1400+ }
 1401+ }
 1402+ else
 1403+ {
 1404+ if (debugvalue)
 1405+ debugvalue = FALSE;
 1406+ else debugvalue = TRUE;
 1407+ }
 1408+ WriteDebugItem(item, debugvalue, debugmask);
 1409+ RedrawWindow(GetDlgItem(hWnd, IDC_DEBUGLIST), NULL, NULL, RDW_INVALIDATE);
 1410+ EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
 1411+ *dirty = TRUE;
 1412+ }
 1413+ break;
 1414+ default:
 1415+ break;
 1416+ }
 1417+ case WM_DRAWITEM:
 1418+ drawitem = (DRAWITEMSTRUCT*)lParam;
 1419+ switch (wParam)
 1420+ {
 1421+ case IDC_DEBUGLIST:
 1422+ OldTextColor = GetTextColor(drawitem->hDC);
 1423+ OldBackColor = GetBkColor(drawitem->hDC);
 1424+ if((drawitem->itemState & ODS_SELECTED))
 1425+ {
 1426+ SetTextColor(drawitem->hDC,GetSysColor(COLOR_HIGHLIGHTTEXT));
 1427+ SetBkColor(drawitem->hDC,GetSysColor(COLOR_HIGHLIGHT));
 1428+ FillRect(drawitem->hDC,&drawitem->rcItem,(HBRUSH)(COLOR_HIGHLIGHT+1));
 1429+ }
 1430+ else
 1431+ {
 1432+ SetTextColor(drawitem->hDC, GetSysColor(COLOR_WINDOWTEXT));
 1433+ SetBkColor(drawitem->hDC, GetSysColor(COLOR_WINDOW));
 1434+ FillRect(drawitem->hDC, &drawitem->rcItem, (HBRUSH)(COLOR_WINDOW + 1));
 1435+ }
 1436+ memcpy(&r, &drawitem->rcItem, sizeof(RECT));
 1437+ r.left = r.left + 2;
 1438+ r.right = r.left + GetSystemMetrics(SM_CXMENUCHECK);
 1439+ ReadDebugItem(drawitem->itemID, &debugvalue, &debugmask);
 1440+ DrawCheck(drawitem->hDC, drawitem->itemState & ODS_SELECTED, debugvalue, FALSE, !debugmask, &r);
 1441+ drawitem->rcItem.left += GetSystemMetrics(SM_CXSMICON)+5;
 1442+ SendDlgItemMessage(hWnd, IDC_DEBUGLIST, LB_GETTEXT, drawitem->itemID, (LPARAM)str);
 1443+ DrawText(drawitem->hDC, str, _tcslen(str), &drawitem->rcItem,
 1444+ DT_LEFT | DT_SINGLELINE | DT_VCENTER);
 1445+ drawitem->rcItem.left -= GetSystemMetrics(SM_CXSMICON)+5;
 1446+ if (drawitem->itemState & ODS_FOCUS) DrawFocusRect(drawitem->hDC, &drawitem->rcItem);
 1447+ SetTextColor(drawitem->hDC,OldTextColor);
 1448+ SetBkColor(drawitem->hDC,OldBackColor);
 1449+ DefWindowProc(hWnd,Msg,wParam,lParam);
 1450+ break;
 1451+ default:
 1452+ break;
 1453+ }
 1454+ break;
12151455 default:
12161456 return FALSE;
12171457 }
@@ -1381,6 +1621,12 @@
13821622 SendDlgItemMessage(hWnd, IDC_TABS, TCM_INSERTITEM, 3, (LPARAM)&tab);
13831623 tab.pszText = _T("Debug");
13841624 SendDlgItemMessage(hWnd, IDC_TABS, TCM_INSERTITEM, 4, (LPARAM)&tab);
 1625+/* tab.pszText = _T("Hacks");
 1626+ SendDlgItemMessage(hWnd, IDC_TABS, TCM_INSERTITEM, 5, (LPARAM)&tab);
 1627+ tab.pszText = _T("Graphics Tests");
 1628+ SendDlgItemMessage(hWnd, IDC_TABS, TCM_INSERTITEM, 6, (LPARAM)&tab);
 1629+ tab.pszText = _T("About");
 1630+ SendDlgItemMessage(hWnd, IDC_TABS, TCM_INSERTITEM, 7, (LPARAM)&tab);*/
13851631 hTab = GetDlgItem(hWnd, IDC_TABS);
13861632 hTabs[0] = CreateDialog(hinstance, MAKEINTRESOURCE(IDD_DISPLAY), hTab, DisplayTabCallback);
13871633 hTabs[1] = CreateDialog(hinstance, MAKEINTRESOURCE(IDD_EFFECTS), hTab, EffectsTabCallback);
@@ -1412,7 +1658,7 @@
14131659 SendDlgItemMessage(hTabs[0], IDC_VIDMODE, CB_ADDSTRING, 5, (LPARAM)buffer);
14141660 _tcscpy(buffer,_T("Center if mode not found"));
14151661 SendDlgItemMessage(hTabs[0], IDC_VIDMODE, CB_ADDSTRING, 6, (LPARAM)buffer);
1416 - _tcscpy(buffer,_T("Crop to screen (experimental)"));
 1662+ _tcscpy(buffer,_T("Crop to screen"));
14171663 SendDlgItemMessage(hTabs[0],IDC_VIDMODE,CB_ADDSTRING,7,(LPARAM)buffer);
14181664 SendDlgItemMessage(hTabs[0],IDC_VIDMODE,CB_SETCURSEL,cfg->scaler,0);
14191665 // fullscreen window mode
@@ -1664,8 +1910,29 @@
16651911 _tcscpy(buffer, _T("Windows AppCompat"));
16661912 SendDlgItemMessage(hTabs[0],IDC_DPISCALE,CB_ADDSTRING,2,(LPARAM)buffer);
16671913 SendDlgItemMessage(hTabs[0],IDC_DPISCALE,CB_SETCURSEL,cfg->DPIScale,0);
 1914+ // Paths
16681915 EnableWindow(GetDlgItem(hTabs[3], IDC_PATHLABEL), FALSE);
16691916 EnableWindow(GetDlgItem(hTabs[3], IDC_PROFILEPATH), FALSE);
 1917+ // Debug
 1918+ _tcscpy(buffer, _T("Disable EXT framebuffers"));
 1919+ SendDlgItemMessage(hTabs[4], IDC_DEBUGLIST, LB_ADDSTRING, 0, (LPARAM)buffer);
 1920+ _tcscpy(buffer, _T("Disable ARB framebuffers"));
 1921+ SendDlgItemMessage(hTabs[4], IDC_DEBUGLIST, LB_ADDSTRING, 0, (LPARAM)buffer);
 1922+ _tcscpy(buffer, _T("Disable GLES2 compatibility extension"));
 1923+ SendDlgItemMessage(hTabs[4], IDC_DEBUGLIST, LB_ADDSTRING, 0, (LPARAM)buffer);
 1924+ _tcscpy(buffer, _T("Disable EXT direct state access"));
 1925+ SendDlgItemMessage(hTabs[4], IDC_DEBUGLIST, LB_ADDSTRING, 0, (LPARAM)buffer);
 1926+ _tcscpy(buffer, _T("Disable ARB direct state access"));
 1927+ SendDlgItemMessage(hTabs[4], IDC_DEBUGLIST, LB_ADDSTRING, 0, (LPARAM)buffer);
 1928+ _tcscpy(buffer, _T("Disable sampler objects"));
 1929+ SendDlgItemMessage(hTabs[4], IDC_DEBUGLIST, LB_ADDSTRING, 0, (LPARAM)buffer);
 1930+ _tcscpy(buffer, _T("Disable EXT_gpu_shader4 extension"));
 1931+ SendDlgItemMessage(hTabs[4], IDC_DEBUGLIST, LB_ADDSTRING, 0, (LPARAM)buffer);
 1932+ _tcscpy(buffer, _T("Disable GLSL 1.30 support"));
 1933+ SendDlgItemMessage(hTabs[4], IDC_DEBUGLIST, LB_ADDSTRING, 0, (LPARAM)buffer);
 1934+ /*_tcscpy(buffer, _T("Disable OpenGL errors (OpenGL 4.6+)"));
 1935+ SendDlgItemMessage(hTabs[4], IDC_DEBUGLIST, LB_ADDSTRING, 0, (LPARAM)buffer);*/
 1936+
16701937 // Check install path
16711938 installpath = NULL;
16721939 error = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("Software\\DXGL"), 0, KEY_READ, &hKey);
@@ -1963,10 +2230,8 @@
19642231 SendDlgItemMessage(hTabs[2], IDC_ANISO, CB_ADDSTRING, 0, (LPARAM)strdefault);
19652232 SendDlgItemMessage(hTabs[2], IDC_MSAA, CB_ADDSTRING, 0, (LPARAM)strdefault);
19662233 SendDlgItemMessage(hTabs[2], IDC_ASPECT3D, CB_ADDSTRING, 0, (LPARAM)strdefault);
1967 - /*
1968 - SendDlgItemMessage(hWnd,IDC_TEXTUREFORMAT,CB_ADDSTRING,0,(LPARAM)strdefault);
1969 - SendDlgItemMessage(hWnd,IDC_TEXUPLOAD,CB_ADDSTRING,0,(LPARAM)strdefault);
1970 - */
 2234+ SendDlgItemMessage(hTabs[3],IDC_TEXTUREFORMAT,CB_ADDSTRING,0,(LPARAM)strdefault);
 2235+ SendDlgItemMessage(hTabs[3],IDC_TEXUPLOAD,CB_ADDSTRING,0,(LPARAM)strdefault);
19712236 }
19722237 else if(!current_app && tristate)
19732238 {
@@ -2006,12 +2271,10 @@
20072272 SendDlgItemMessage(hTabs[2], IDC_MSAA, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
20082273 SendDlgItemMessage(hTabs[2], IDC_ASPECT3D, CB_DELETESTRING,
20092274 SendDlgItemMessage(hTabs[2], IDC_ASPECT3D, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
2010 - /*
2011 - SendDlgItemMessage(hWnd,IDC_TEXTUREFORMAT,CB_DELETESTRING,
2012 - SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
2013 - SendDlgItemMessage(hWnd,IDC_TEXUPLOAD,CB_DELETESTRING,
2014 - SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
2015 - */
 2275+ SendDlgItemMessage(hTabs[3],IDC_TEXTUREFORMAT,CB_DELETESTRING,
 2276+ SendDlgItemMessage(hTabs[3],IDC_ASPECT3D,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
 2277+ SendDlgItemMessage(hTabs[3],IDC_TEXUPLOAD,CB_DELETESTRING,
 2278+ SendDlgItemMessage(hTabs[3],IDC_ASPECT3D,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
20162279 }
20172280 // Read settings into controls
20182281 // Display tab
@@ -2035,23 +2298,11 @@
20362299 SetCombo(hTabs[2], IDC_ANISO, cfg->anisotropic, cfgmask->anisotropic, tristate);
20372300 SetCombo(hTabs[2], IDC_MSAA, cfg->msaa, cfgmask->msaa, tristate);
20382301 SetCombo(hTabs[2], IDC_ASPECT3D, cfg->aspect3d, cfgmask->aspect3d, tristate);
2039 - /*
2040 - SetCombo(hWnd,IDC_TEXTUREFORMAT,cfg->TextureFormat,cfgmask->TextureFormat,tristate);
2041 - SetCombo(hWnd,IDC_TEXUPLOAD,cfg->TexUpload,cfgmask->TexUpload,tristate);
2042 - */
 2302+ SetCombo(hTabs[3],IDC_TEXTUREFORMAT,cfg->TextureFormat,cfgmask->TextureFormat,tristate);
 2303+ SetCombo(hTabs[3],IDC_TEXUPLOAD,cfg->TexUpload,cfgmask->TexUpload,tristate);
 2304+ RedrawWindow(GetDlgItem(hTabs[4], IDC_DEBUGLIST), NULL, NULL, RDW_INVALIDATE);
20432305 }
2044 - break;/*
2045 - case IDC_TEXTUREFORMAT:
2046 - cfg->TextureFormat = GetCombo(hWnd,IDC_TEXTUREFORMAT,&cfgmask->TextureFormat);
2047 - EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
2048 - *dirty = TRUE;
20492306 break;
2050 - case IDC_TEXUPLOAD:
2051 - cfg->TexUpload = GetCombo(hWnd,IDC_TEXUPLOAD,&cfgmask->TexUpload);
2052 - EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
2053 - *dirty = TRUE;
2054 - break;
2055 -*/
20562307 case IDC_ADD:
20572308 selectedfile[0] = 0;
20582309 ZeroMemory(&filename, OPENFILENAME_SIZE_VERSION_400);
@@ -2497,7 +2748,7 @@
24982749 if (GetLastError() == ERROR_ALREADY_EXISTS)
24992750 {
25002751 // Find DXGL Config window
2501 - hWnd = FindWindow(NULL, _T("DXGL Config (Experimental)"));
 2752+ hWnd = FindWindow(NULL, _T("DXGL Config"));
25022753 // Focus DXGL Config window
25032754 if (hWnd) SetForegroundWindow(hWnd);
25042755 return 0;
Index: dxglcfg2/dxglcfg2.rc
@@ -32,7 +32,7 @@
3333 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
3434 IDD_DXGLCFG DIALOG 0, 0, 354, 242
3535 STYLE DS_3DLOOK | DS_CONTEXTHELP | DS_SETFONT | WS_CAPTION | WS_SYSMENU
36 -CAPTION "DXGL Config (Experimental)"
 36+CAPTION "DXGL Config"
3737 FONT 8, "Ms Shell Dlg 2"
3838 {
3939 LTEXT "Application profile", IDC_STATIC, 7, 7, 58, 8, SS_LEFT, WS_EX_LEFT
@@ -56,19 +56,19 @@
5757 COMBOBOX IDC_VIDMODE, 7, 17, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
5858 LTEXT "Add color depths", IDC_STATIC, 114, 7, 54, 8, SS_LEFT, WS_EX_LEFT
5959 COMBOBOX IDC_COLORDEPTH, 114, 17, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_OWNERDRAWFIXED, WS_EX_LEFT
60 - LTEXT "Scaling method", IDC_STATIC, 7, 32, 49, 9, SS_LEFT, WS_EX_LEFT
 60+ LTEXT "Scaling method", IDC_STATIC, 7, 32, 50, 9, SS_LEFT, WS_EX_LEFT
6161 COMBOBOX IDC_SCALE, 7, 43, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
62 - LTEXT "Additional display modes", IDC_STATIC, 114, 32, 78, 8, SS_LEFT, WS_EX_LEFT
 62+ LTEXT "Additional display modes", IDC_STATIC, 114, 32, 80, 8, SS_LEFT, WS_EX_LEFT
6363 COMBOBOX IDC_EXTRAMODES, 114, 43, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_OWNERDRAWFIXED, WS_EX_LEFT
6464 LTEXT "Screen aspect ratio", IDC_STATIC, 7, 58, 63, 8, SS_LEFT, WS_EX_LEFT
6565 COMBOBOX IDC_ASPECT, 7, 68, 102, 30, CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
6666 LTEXT "Sort video modes", IDC_STATIC, 114, 58, 56, 8, SS_LEFT, WS_EX_LEFT
6767 COMBOBOX IDC_SORTMODES, 114, 68, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
68 - LTEXT "DPI scaling mode", IDC_STATIC, 7, 83, 55, 8, SS_LEFT, WS_EX_LEFT
 68+ LTEXT "DPI scaling mode", IDC_STATIC, 7, 83, 56, 8, SS_LEFT, WS_EX_LEFT
6969 COMBOBOX IDC_DPISCALE, 7, 93, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
7070 LTEXT "Vertical sync", IDC_STATIC, 114, 83, 41, 8, SS_LEFT, WS_EX_LEFT
7171 COMBOBOX IDC_VSYNC, 114, 93, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
72 - LTEXT "Fullscreen window mode", IDC_STATIC, 7, 108, 78, 9, SS_LEFT, WS_EX_LEFT
 72+ LTEXT "Fullscreen window mode", IDC_STATIC, 7, 108, 79, 9, SS_LEFT, WS_EX_LEFT
7373 COMBOBOX IDC_FULLMODE, 7, 119, 101, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
7474 LTEXT "Fixed scaling", IDC_FIXEDSCALELABEL, 114, 108, 47, 9, WS_DISABLED | SS_LEFT, WS_EX_LEFT
7575 LTEXT "X", IDC_FIXEDSCALELABELX, 114, 122, 8, 9, WS_DISABLED | SS_LEFT, WS_EX_LEFT
@@ -91,7 +91,7 @@
9292 COMBOBOX IDC_TEXFILTER, 7, 17, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
9393 LTEXT "Anisotropic filtering", IDC_STATIC, 114, 7, 62, 8, SS_LEFT, WS_EX_LEFT
9494 COMBOBOX IDC_ANISO, 114, 17, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
95 - LTEXT "Antialiasing (MSAA)", IDC_STATIC, 7, 32, 63, 8, SS_LEFT, WS_EX_LEFT
 95+ LTEXT "Antialiasing (MSAA)", IDC_STATIC, 7, 32, 64, 8, SS_LEFT, WS_EX_LEFT
9696 COMBOBOX IDC_MSAA, 7, 43, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
9797 LTEXT "Renderer aspect ratio", IDC_STATIC, 114, 32, 71, 8, SS_LEFT, WS_EX_LEFT
9898 COMBOBOX IDC_ASPECT3D, 114, 43, 102, 14, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
@@ -112,9 +112,9 @@
113113 COMBOBOX IDC_TEXTUREFORMAT, 7, 17, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
114114 LTEXT "Texture access method", IDC_STATIC, 114, 7, 76, 8, SS_LEFT, WS_EX_LEFT
115115 COMBOBOX IDC_TEXUPLOAD, 114, 17, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
116 - LTEXT "Display name", 0, 7, 35, 43, 9, SS_LEFT, WS_EX_LEFT
 116+ LTEXT "Display name", 0, 7, 35, 44, 9, SS_LEFT, WS_EX_LEFT
117117 EDITTEXT IDC_DISPLAYNAME, 7, 46, 209, 14, ES_AUTOHSCROLL, WS_EX_LEFT
118 - LTEXT "Installation path", IDC_PATHLABEL, 7, 94, 50, 9, SS_LEFT, WS_EX_LEFT
 118+ LTEXT "Installation path", IDC_PATHLABEL, 7, 94, 51, 9, SS_LEFT, WS_EX_LEFT
119119 EDITTEXT IDC_PROFILEPATH, 7, 105, 209, 14, NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL | ES_READONLY, WS_EX_LEFT
120120 PUSHBUTTON "Write INI file...", IDC_WRITEINI, 203, 151, 73, 14, 0, WS_EX_LEFT
121121 }
@@ -126,7 +126,11 @@
127127 STYLE DS_3DLOOK | DS_CENTER | DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW
128128 FONT 8, "Ms Shell Dlg"
129129 {
130 - LISTBOX IDC_DEBUGLIST, 7, 7, 269, 158, WS_TABSTOP | WS_VSCROLL | LBS_NOINTEGRALHEIGHT | LBS_OWNERDRAWFIXED | LBS_SORT | LBS_NOTIFY, WS_EX_LEFT
 130+ LTEXT "Changing these options may affect the functionality of DXGL and should only be done if necessary.", 0, 7, 5, 320, 9, SS_LEFT, WS_EX_LEFT
 131+ LISTBOX IDC_DEBUGLIST, 7, 16, 269, 130, WS_TABSTOP | WS_VSCROLL | LBS_NOINTEGRALHEIGHT |
 132+ LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOTIFY, WS_EX_LEFT
 133+ LTEXT "Maximum OpenGL Version", 0, 8, 153, 86, 9, SS_LEFT, WS_EX_LEFT
 134+ COMBOBOX IDC_GLVERSION, 96, 151, 101, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
131135 }
132136
133137
@@ -136,16 +140,16 @@
137141 STYLE DS_3DLOOK | DS_CENTER | DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW
138142 FONT 8, "Ms Shell Dlg"
139143 {
140 - LTEXT "Postprocess scaler", IDC_STATIC, 7, 5, 60, 9, SS_LEFT, WS_EX_LEFT
 144+ LTEXT "Postprocess scaler", IDC_STATIC, 7, 5, 61, 9, SS_LEFT, WS_EX_LEFT
141145 COMBOBOX IDC_POSTSCALE, 7, 15, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
142 - LTEXT "Postprocess input miultiplier", IDC_STATIC, 114, 5, 86, 9, SS_LEFT, WS_EX_LEFT
 146+ LTEXT "Postprocess input miultiplier", IDC_STATIC, 114, 5, 90, 9, SS_LEFT, WS_EX_LEFT
143147 COMBOBOX IDC_POSTSCALESIZE, 114, 15, 102, 30, CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
144148 AUTOCHECKBOX "Use post-processing shader", IDC_USESHADER, 7, 34, 103, 8, 0, WS_EX_LEFT
145149 COMBOBOX IDC_SHADER, 7, 44, 247, 92, WS_DISABLED | CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
146150 PUSHBUTTON "...", IDC_BROWSESHADER, 256, 43, 20, 14, WS_DISABLED, WS_EX_LEFT
147 - LTEXT "Primary buffer scaling", IDC_STATIC, 7, 60, 68, 8, SS_LEFT, WS_EX_LEFT
 151+ LTEXT "Primary buffer scaling", IDC_STATIC, 7, 60, 70, 8, SS_LEFT, WS_EX_LEFT
148152 COMBOBOX IDC_PRIMARYSCALE, 7, 70, 101, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
149 - LTEXT "Custom scale", IDC_CUSTOMSCALELABEL, 7, 85, 43, 8, WS_DISABLED | SS_LEFT, WS_EX_LEFT
 153+ LTEXT "Custom scale", IDC_CUSTOMSCALELABEL, 7, 85, 44, 8, WS_DISABLED | SS_LEFT, WS_EX_LEFT
150154 LTEXT "X", IDC_CUSTOMSCALELABELX, 7, 98, 8, 8, WS_DISABLED | SS_LEFT, WS_EX_LEFT
151155 EDITTEXT IDC_CUSTOMSCALEX, 15, 95, 40, 14, WS_DISABLED | ES_AUTOHSCROLL, WS_EX_LEFT
152156 LTEXT "Y", IDC_CUSTOMSCALELABELY, 57, 98, 8, 8, WS_DISABLED | SS_LEFT, WS_EX_LEFT
Index: dxglcfg2/resource.h
@@ -95,4 +95,5 @@
9696
9797 // Controls - Debug Tab
9898 #define IDC_DEBUGLIST 2401
 99+#define IDC_GLVERSION 2402
99100