Index: cfgmgr/cfgmgr.c |
— | — | @@ -979,7 +979,7 @@ |
980 | 980 | cfg->WindowWidth = 640;
|
981 | 981 | cfg->WindowHeight = 480;
|
982 | 982 | cfg->HackPaletteDelay = 30;
|
983 | | - cfg->LimitTextureFormats = TRUE;
|
| 983 | + cfg->LimitTextureFormats = 1;
|
984 | 984 | if (!cfg->Windows8Detected)
|
985 | 985 | {
|
986 | 986 | OSVERSIONINFO osver;
|
— | — | @@ -1552,7 +1552,7 @@ |
1553 | 1553 | INIWriteInt(file, "D3DAspect", cfg->aspect3d, mask->aspect3d, INISECTION_D3D);
|
1554 | 1554 | INIWriteInt(file, "LowColorRendering", cfg->LowColorRendering, mask->LowColorRendering, INISECTION_D3D);
|
1555 | 1555 | INIWriteInt(file, "EnableDithering", cfg->EnableDithering, mask->EnableDithering, INISECTION_D3D);
|
1556 | | - INIWriteBool(file, "LimitTextureFormats", cfg->LimitTextureFormats, mask->LimitTextureFormats, INISECTION_D3D);
|
| 1556 | + INIWriteInt(file, "LimitTextureFormats", cfg->LimitTextureFormats, mask->LimitTextureFormats, INISECTION_D3D);
|
1557 | 1557 | // [advanced]
|
1558 | 1558 | INIWriteInt(file, "TextureFormat", cfg->TextureFormat, mask->TextureFormat, INISECTION_ADVANCED);
|
1559 | 1559 | INIWriteInt(file, "TexUpload", cfg->TexUpload, mask->TexUpload, INISECTION_ADVANCED);
|
Index: cfgmgr/cfgmgr.h |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | DWORD aspect3d;
|
69 | 69 | DWORD LowColorRendering;
|
70 | 70 | DWORD EnableDithering;
|
71 | | - BOOL LimitTextureFormats;
|
| 71 | + DWORD LimitTextureFormats;
|
72 | 72 | // [advanced]
|
73 | 73 | DWORD vsync;
|
74 | 74 | DWORD TextureFormat;
|
Index: dxgl-example.ini |
— | — | @@ -411,10 +411,15 @@ |
412 | 412 | ; Default is 0
|
413 | 413 | EnableDithering=0
|
414 | 414 |
|
415 | | -; LimitTextureFormats - Boolean
|
| 415 | +; LimitTextureFormats - Integer
|
416 | 416 | ; Limits the available texture formats returned by EnumTextureFormats to
|
417 | | -; avoid crashes in some games. Default is true.
|
418 | | -LimitTextureFormats=true
|
| 417 | +; avoid crashes in some games.
|
| 418 | +; The following values are valid:
|
| 419 | +; 0 - Don't limit formats regardless of API version
|
| 420 | +; 1 - Limit formats on API versions 2 and 1 (DirectX 5 and DirectX 3/2)
|
| 421 | +; 2 - Limit formats on all API versions.
|
| 422 | +; Default is 1
|
| 423 | +LimitTextureFormats=1
|
419 | 424 |
|
420 | 425 | [advanced]
|
421 | 426 | ; TextureFormat - Integer
|
Index: dxglcfg/dxglcfg.cpp |
— | — | @@ -1982,7 +1982,7 @@ |
1983 | 1983 | *dirty = TRUE;
|
1984 | 1984 | break;
|
1985 | 1985 | case IDC_LIMITTEXFORMATS:
|
1986 | | - cfg->LimitTextureFormats = GetCheck(hWnd, IDC_SINGLEBUFFER, &cfgmask->LimitTextureFormats);
|
| 1986 | + cfg->LimitTextureFormats = GetCombo(hWnd, IDC_LIMITTEXFORMATS, &cfgmask->LimitTextureFormats);
|
1987 | 1987 | EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
|
1988 | 1988 | *dirty = TRUE;
|
1989 | 1989 | break;
|
— | — | @@ -2890,7 +2890,7 @@ |
2891 | 2891 | SendDlgItemMessage(hTabs[2], IDC_ASPECT3D, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
2892 | 2892 | SendDlgItemMessage(hTabs[2], IDC_LOWCOLORRENDER, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
2893 | 2893 | SendDlgItemMessage(hTabs[2], IDC_DITHERING, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
2894 | | - SendDlgItemMessage(hTabs[2], IDC_LIMITTEXFORMATS, BM_SETSTYLE, BS_AUTO3STATE, (LPARAM)TRUE);
|
| 2894 | + SendDlgItemMessage(hTabs[2], IDC_LIMITTEXFORMATS, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
2895 | 2895 | // Advanced tab
|
2896 | 2896 | SendDlgItemMessage(hTabs[3], IDC_TEXTUREFORMAT, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
2897 | 2897 | SendDlgItemMessage(hTabs[3], IDC_TEXUPLOAD, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
— | — | @@ -2949,7 +2949,8 @@ |
2950 | 2950 | SendDlgItemMessage(hTabs[2], IDC_LOWCOLORRENDER, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
2951 | 2951 | SendDlgItemMessage(hTabs[2], IDC_DITHERING, CB_DELETESTRING,
|
2952 | 2952 | SendDlgItemMessage(hTabs[2], IDC_DITHERING, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
2953 | | - SendDlgItemMessage(hTabs[2], IDC_LIMITTEXFORMATS, BM_SETSTYLE, BS_AUTOCHECKBOX, TRUE);
|
| 2953 | + SendDlgItemMessage(hTabs[2], IDC_LIMITTEXFORMATS, CB_DELETESTRING,
|
| 2954 | + SendDlgItemMessage(hTabs[2], IDC_LIMITTEXFORMATS, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
2954 | 2955 | // Advanced tab
|
2955 | 2956 | SendDlgItemMessage(hTabs[3], IDC_TEXTUREFORMAT, CB_DELETESTRING,
|
2956 | 2957 | SendDlgItemMessage(hTabs[3], IDC_TEXTUREFORMAT, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
— | — | @@ -3048,7 +3049,7 @@ |
3049 | 3050 | SetCombo(hTabs[2], IDC_ASPECT3D, cfg->aspect3d, cfgmask->aspect3d, tristate);
|
3050 | 3051 | SetCombo(hTabs[2], IDC_LOWCOLORRENDER, cfg->LowColorRendering, cfgmask->LowColorRendering, tristate);
|
3051 | 3052 | SetCombo(hTabs[2], IDC_DITHERING, cfg->EnableDithering, cfgmask->EnableDithering, tristate);
|
3052 | | - SetCheck(hTabs[2], IDC_LIMITTEXFORMATS, cfg->LimitTextureFormats, cfgmask->LimitTextureFormats, tristate);
|
| 3053 | + SetCombo(hTabs[2], IDC_LIMITTEXFORMATS, cfg->LimitTextureFormats, cfgmask->LimitTextureFormats, tristate);
|
3053 | 3054 | // Advanced tab
|
3054 | 3055 | SetCombo(hTabs[3], IDC_TEXTUREFORMAT, cfg->TextureFormat, cfgmask->TextureFormat, tristate);
|
3055 | 3056 | SetCombo(hTabs[3], IDC_TEXUPLOAD, cfg->TexUpload, cfgmask->TexUpload, tristate);
|
— | — | @@ -3616,9 +3617,14 @@ |
3617 | 3618 | _tcscpy(buffer, _T("Always enabled, low color"));
|
3618 | 3619 | SendDlgItemMessage(hTabs[2], IDC_DITHERING, CB_ADDSTRING, 0, (LPARAM)buffer);
|
3619 | 3620 | SendDlgItemMessage(hTabs[2], IDC_DITHERING, CB_SETCURSEL, cfg->EnableDithering, 0);
|
3620 | | - if (cfg->LimitTextureFormats) SendDlgItemMessage(hTabs[2], IDC_LIMITTEXFORMATS, BM_SETCHECK, BST_CHECKED, 0);
|
3621 | | - else SendDlgItemMessage(hTabs[2], IDC_LIMITTEXFORMATS, BM_SETCHECK, BST_UNCHECKED, 0);
|
3622 | | -
|
| 3621 | + // Limit texture formats
|
| 3622 | + _tcscpy(buffer, _T("Disabled"));
|
| 3623 | + SendDlgItemMessage(hTabs[2], IDC_LIMITTEXFORMATS, CB_ADDSTRING, 0, (LPARAM)buffer);
|
| 3624 | + _tcscpy(buffer, _T("Enabled for DX5 and below"));
|
| 3625 | + SendDlgItemMessage(hTabs[2], IDC_LIMITTEXFORMATS, CB_ADDSTRING, 0, (LPARAM)buffer);
|
| 3626 | + _tcscpy(buffer, _T("Enabled always"));
|
| 3627 | + SendDlgItemMessage(hTabs[2], IDC_LIMITTEXFORMATS, CB_ADDSTRING, 0, (LPARAM)buffer);
|
| 3628 | + SendDlgItemMessage(hTabs[2], IDC_LIMITTEXFORMATS, CB_SETCURSEL, cfg->LimitTextureFormats, 0);
|
3623 | 3629 | // sort modes
|
3624 | 3630 | _tcscpy(buffer,_T("Use system order"));
|
3625 | 3631 | SendDlgItemMessage(hTabs[0], IDC_SORTMODES, CB_ADDSTRING, 0, (LPARAM)buffer);
|
Index: dxglcfg/dxglcfg.rc |
— | — | @@ -102,7 +102,8 @@ |
103 | 103 | COMBOBOX IDC_LOWCOLORRENDER, 7, 68, 102, 64, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
|
104 | 104 | LTEXT "Enable dithering", IDC_STATIC, 114, 58, 52, 9, SS_LEFT, WS_EX_LEFT
|
105 | 105 | COMBOBOX IDC_DITHERING, 114, 68, 102, 64, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
|
106 | | - AUTOCHECKBOX "Limit D3D Texture Formats", IDC_LIMITTEXFORMATS, 7, 86, 99, 8, 0, WS_EX_LEFT
|
| 106 | + LTEXT "Limit D3D Texture Formats", 0, 7, 83, 84, 9, SS_LEFT, WS_EX_LEFT
|
| 107 | + COMBOBOX IDC_LIMITTEXFORMATS, 7, 94, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
|
107 | 108 | }
|
108 | 109 |
|
109 | 110 |
|