DXGL r758 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r757‎ | r758 | r759 >
Date:21:01, 5 November 2017
Author:admin
Status:new
Tags:
Comment:
Implement 3D Graphics tab in DXGLCfg2.
Modified paths:
  • /dxglcfg2/dxglcfg2.c (modified) (history)

Diff [purge]

Index: dxglcfg2/dxglcfg2.c
@@ -1161,6 +1161,30 @@
11621162 case WM_INITDIALOG:
11631163 if (_EnableThemeDialogTexture) _EnableThemeDialogTexture(hWnd, ETDT_ENABLETAB);
11641164 return TRUE;
 1165+ case WM_COMMAND:
 1166+ switch (LOWORD(wParam))
 1167+ {
 1168+ case IDC_TEXFILTER:
 1169+ cfg->texfilter = GetCombo(hWnd, IDC_TEXFILTER, &cfgmask->texfilter);
 1170+ EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
 1171+ *dirty = TRUE;
 1172+ break;
 1173+ case IDC_ANISO:
 1174+ cfg->anisotropic = GetCombo(hWnd, IDC_ANISO, &cfgmask->anisotropic);
 1175+ EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
 1176+ *dirty = TRUE;
 1177+ break;
 1178+ case IDC_MSAA:
 1179+ cfg->msaa = GetCombo(hWnd, IDC_MSAA, &cfgmask->msaa);
 1180+ EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
 1181+ *dirty = TRUE;
 1182+ break;
 1183+ case IDC_ASPECT3D:
 1184+ cfg->aspect3d = GetCombo(hWnd, IDC_ASPECT3D, &cfgmask->aspect3d);
 1185+ EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
 1186+ *dirty = TRUE;
 1187+ break;
 1188+ }
11651189 default:
11661190 return FALSE;
11671191 }
@@ -1935,11 +1959,11 @@
19361960 SendDlgItemMessage(hTabs[1], IDC_POSTSCALE, CB_ADDSTRING, 0, (LPARAM)strdefault);
19371961 SendDlgItemMessage(hTabs[1], IDC_POSTSCALESIZE, CB_ADDSTRING, 0, (LPARAM)strdefault);
19381962 SendDlgItemMessage(hTabs[1], IDC_PRIMARYSCALE, CB_ADDSTRING, 0, (LPARAM)strdefault);
 1963+ SendDlgItemMessage(hTabs[2], IDC_TEXFILTER, CB_ADDSTRING, 0, (LPARAM)strdefault);
 1964+ SendDlgItemMessage(hTabs[2], IDC_ANISO, CB_ADDSTRING, 0, (LPARAM)strdefault);
 1965+ SendDlgItemMessage(hTabs[2], IDC_MSAA, CB_ADDSTRING, 0, (LPARAM)strdefault);
 1966+ SendDlgItemMessage(hTabs[2], IDC_ASPECT3D, CB_ADDSTRING, 0, (LPARAM)strdefault);
19391967 /*
1940 - SendDlgItemMessage(hWnd,IDC_MSAA,CB_ADDSTRING,0,(LPARAM)strdefault);
1941 - SendDlgItemMessage(hWnd,IDC_ANISO,CB_ADDSTRING,0,(LPARAM)strdefault);
1942 - SendDlgItemMessage(hWnd,IDC_TEXFILTER,CB_ADDSTRING,0,(LPARAM)strdefault);
1943 - SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_ADDSTRING,0,(LPARAM)strdefault);
19441968 SendDlgItemMessage(hWnd,IDC_TEXTUREFORMAT,CB_ADDSTRING,0,(LPARAM)strdefault);
19451969 SendDlgItemMessage(hWnd,IDC_TEXUPLOAD,CB_ADDSTRING,0,(LPARAM)strdefault);
19461970 */
@@ -1974,15 +1998,15 @@
19751999 SendDlgItemMessage(hTabs[1], IDC_POSTSCALESIZE, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
19762000 SendDlgItemMessage(hTabs[1], IDC_PRIMARYSCALE, CB_DELETESTRING,
19772001 SendDlgItemMessage(hTabs[1], IDC_PRIMARYSCALE, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
 2002+ SendDlgItemMessage(hTabs[2], IDC_TEXFILTER, CB_DELETESTRING,
 2003+ SendDlgItemMessage(hTabs[2], IDC_TEXFILTER, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
 2004+ SendDlgItemMessage(hTabs[2], IDC_ANISO, CB_DELETESTRING,
 2005+ SendDlgItemMessage(hTabs[2], IDC_ANISO, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
 2006+ SendDlgItemMessage(hTabs[2], IDC_MSAA, CB_DELETESTRING,
 2007+ SendDlgItemMessage(hTabs[2], IDC_MSAA, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
 2008+ SendDlgItemMessage(hTabs[2], IDC_ASPECT3D, CB_DELETESTRING,
 2009+ SendDlgItemMessage(hTabs[2], IDC_ASPECT3D, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
19782010 /*
1979 - SendDlgItemMessage(hWnd,IDC_MSAA,CB_DELETESTRING,
1980 - SendDlgItemMessage(hWnd,IDC_MSAA,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
1981 - SendDlgItemMessage(hWnd,IDC_ANISO,CB_DELETESTRING,
1982 - SendDlgItemMessage(hWnd,IDC_ANISO,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
1983 - SendDlgItemMessage(hWnd,IDC_TEXFILTER,CB_DELETESTRING,
1984 - SendDlgItemMessage(hWnd,IDC_TEXFILTER,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
1985 - SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_DELETESTRING,
1986 - SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
19872011 SendDlgItemMessage(hWnd,IDC_TEXTUREFORMAT,CB_DELETESTRING,
19882012 SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
19892013 SendDlgItemMessage(hWnd,IDC_TEXUPLOAD,CB_DELETESTRING,
@@ -2006,39 +2030,17 @@
20072031 SetPostScaleCombo(hTabs[1], IDC_POSTSCALESIZE, cfg->postsizex, cfg->postsizey,
20082032 cfgmask->postsizex , cfgmask->postsizey, tristate);
20092033 SetCombo(hTabs[1], IDC_PRIMARYSCALE, cfg->primaryscale, cfgmask->primaryscale, tristate);
 2034+ SetText(hTabs[1], IDC_SHADER, cfg->shaderfile, cfgmask->shaderfile, tristate);
 2035+ SetCombo(hTabs[2], IDC_TEXFILTER, cfg->texfilter, cfgmask->texfilter, tristate);
 2036+ SetCombo(hTabs[2], IDC_ANISO, cfg->anisotropic, cfgmask->anisotropic, tristate);
 2037+ SetCombo(hTabs[2], IDC_MSAA, cfg->msaa, cfgmask->msaa, tristate);
 2038+ SetCombo(hTabs[2], IDC_ASPECT3D, cfg->aspect3d, cfgmask->aspect3d, tristate);
20102039 /*
2011 - SetCombo(hWnd,IDC_MSAA,cfg->msaa,cfgmask->msaa,tristate);
2012 - SetCombo(hWnd,IDC_ANISO,cfg->anisotropic,cfgmask->anisotropic,tristate);
2013 - SetCombo(hWnd,IDC_TEXFILTER,cfg->texfilter,cfgmask->texfilter,tristate);
2014 - SetCombo(hWnd,IDC_ASPECT3D,cfg->aspect3d,cfgmask->aspect3d,tristate);
2015 - SetCheck(hWnd,IDC_UNCOMMONCOLOR,cfg->AllColorDepths,cfgmask->AllColorDepths,tristate);
20162040 SetCombo(hWnd,IDC_TEXTUREFORMAT,cfg->TextureFormat,cfgmask->TextureFormat,tristate);
20172041 SetCombo(hWnd,IDC_TEXUPLOAD,cfg->TexUpload,cfgmask->TexUpload,tristate);
2018 - SetCheck(hWnd,IDC_EXTRAMODES,cfg->ExtraModes,cfgmask->ExtraModes,tristate);
2019 - SetText(hWnd,IDC_SHADER,cfg->shaderfile,cfgmask->shaderfile,tristate);
20202042 */
20212043 }
20222044 break;/*
2023 - case IDC_MSAA:
2024 - cfg->msaa = GetCombo(hWnd,IDC_MSAA,&cfgmask->msaa);
2025 - EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
2026 - *dirty = TRUE;
2027 - break;
2028 - case IDC_ANISO:
2029 - cfg->anisotropic = GetCombo(hWnd,IDC_ANISO,&cfgmask->anisotropic);
2030 - EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
2031 - *dirty = TRUE;
2032 - break;
2033 - case IDC_TEXFILTER:
2034 - cfg->texfilter = GetCombo(hWnd,IDC_TEXFILTER,&cfgmask->texfilter);
2035 - EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
2036 - *dirty = TRUE;
2037 - break;
2038 - case IDC_ASPECT3D:
2039 - cfg->aspect3d = GetCombo(hWnd,IDC_ASPECT3D,&cfgmask->aspect3d);
2040 - EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
2041 - *dirty = TRUE;
2042 - break;
20432045 case IDC_TEXTUREFORMAT:
20442046 cfg->TextureFormat = GetCombo(hWnd,IDC_TEXTUREFORMAT,&cfgmask->TextureFormat);
20452047 EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);