Index: dxglcfg2/dxglcfg2.c |
— | — | @@ -67,6 +67,7 @@ |
68 | 68 | int iStateID, const RECT *pRect, const RECT *pClipRect) = NULL;
|
69 | 69 | HRESULT(WINAPI *_EnableThemeDialogTexture)(HWND hwnd, DWORD dwFlags) = NULL;
|
70 | 70 | static BOOL ExtraModes_Dropdown = FALSE;
|
| 71 | +static BOOL ColorDepth_Dropdown = FALSE;
|
71 | 72 | static HWND hDialog = NULL;
|
72 | 73 |
|
73 | 74 |
|
— | — | @@ -117,7 +118,7 @@ |
118 | 119 | _T("15/32-bit"),
|
119 | 120 | _T("8/15/32-bit"),
|
120 | 121 | _T("16/32-bit"),
|
121 | | - _T("8/16/32-bit (recommended)"),
|
| 122 | + _T("8/16/32-bit"),
|
122 | 123 | _T("8/15/32-bit"),
|
123 | 124 | _T("8/15/16/32-bit"),
|
124 | 125 | _T("24/32-bit"),
|
— | — | @@ -130,6 +131,14 @@ |
131 | 132 | _T("8/15/16/24/32-bit")
|
132 | 133 | };
|
133 | 134 |
|
| 135 | +static const TCHAR *colormodedropdown[5] = {
|
| 136 | + _T("8-bit"),
|
| 137 | + _T("15-bit"),
|
| 138 | + _T("16-bit"),
|
| 139 | + _T("24-bit"),
|
| 140 | + _T("32-bit")
|
| 141 | +};
|
| 142 | +
|
134 | 143 | static const TCHAR *extramodes[7] = {
|
135 | 144 | _T("Common low resolutions"),
|
136 | 145 | _T("Uncommon low resolutions"),
|
— | — | @@ -732,6 +741,7 @@ |
733 | 742 | case WM_MEASUREITEM:
|
734 | 743 | switch (wParam)
|
735 | 744 | {
|
| 745 | + case IDC_COLORDEPTH:
|
736 | 746 | case IDC_EXTRAMODES:
|
737 | 747 | ((LPMEASUREITEMSTRUCT)lParam)->itemHeight = GetSystemMetrics(SM_CYMENUCHECK);
|
738 | 748 | ((LPMEASUREITEMSTRUCT)lParam)->itemWidth = GetSystemMetrics(SM_CXMENUCHECK);
|
— | — | @@ -743,6 +753,66 @@ |
744 | 754 | drawitem = (DRAWITEMSTRUCT*)lParam;
|
745 | 755 | switch (wParam)
|
746 | 756 | {
|
| 757 | + case IDC_COLORDEPTH:
|
| 758 | + OldTextColor = GetTextColor(drawitem->hDC);
|
| 759 | + OldBackColor = GetBkColor(drawitem->hDC);
|
| 760 | + if ((drawitem->itemState & ODS_SELECTED) && !(drawitem->itemState & ODS_COMBOBOXEDIT))
|
| 761 | + {
|
| 762 | + SetTextColor(drawitem->hDC, GetSysColor(COLOR_HIGHLIGHTTEXT));
|
| 763 | + SetBkColor(drawitem->hDC, GetSysColor(COLOR_HIGHLIGHT));
|
| 764 | + FillRect(drawitem->hDC, &drawitem->rcItem, (HBRUSH)(COLOR_HIGHLIGHT + 1));
|
| 765 | + }
|
| 766 | + else ExtTextOut(drawitem->hDC, 0, 0, ETO_OPAQUE, &drawitem->rcItem, NULL, 0, NULL);
|
| 767 | + memcpy(&r, &drawitem->rcItem, sizeof(RECT));
|
| 768 | + if (drawitem->itemID != -1 && !(drawitem->itemState & ODS_COMBOBOXEDIT))
|
| 769 | + {
|
| 770 | + r.left = r.left + 2;
|
| 771 | + r.right = r.left + GetSystemMetrics(SM_CXMENUCHECK);
|
| 772 | + if ((cfg->AddColorDepths >> drawitem->itemID) & 1)
|
| 773 | + {
|
| 774 | + if (hThemeDisplay)
|
| 775 | + {
|
| 776 | + if (drawitem->itemState & ODS_SELECTED)
|
| 777 | + _DrawThemeBackground(hThemeDisplay, drawitem->hDC, BS_AUTOCHECKBOX, CBS_CHECKEDHOT, &r, NULL);
|
| 778 | + else _DrawThemeBackground(hThemeDisplay, drawitem->hDC, BS_AUTOCHECKBOX, CBS_CHECKEDNORMAL, &r, NULL);
|
| 779 | + }
|
| 780 | + else
|
| 781 | + {
|
| 782 | + if (drawitem->itemState & ODS_SELECTED)
|
| 783 | + DrawFrameControl(drawitem->hDC, &r, DFC_BUTTON, DFCS_BUTTONCHECK | DFCS_CHECKED | DFCS_HOT);
|
| 784 | + else DrawFrameControl(drawitem->hDC, &r, DFC_BUTTON, DFCS_BUTTONCHECK | DFCS_CHECKED);
|
| 785 | + }
|
| 786 | + }
|
| 787 | + else
|
| 788 | + {
|
| 789 | + if (hThemeDisplay)
|
| 790 | + {
|
| 791 | + if (drawitem->itemState & ODS_SELECTED)
|
| 792 | + _DrawThemeBackground(hThemeDisplay, drawitem->hDC, BS_AUTOCHECKBOX, CBS_UNCHECKEDHOT, &r, NULL);
|
| 793 | + else _DrawThemeBackground(hThemeDisplay, drawitem->hDC, BS_AUTOCHECKBOX, CBS_UNCHECKEDNORMAL, &r, NULL);
|
| 794 | + }
|
| 795 | + else
|
| 796 | + {
|
| 797 | + if (drawitem->itemState & ODS_SELECTED)
|
| 798 | + DrawFrameControl(drawitem->hDC, &r, DFC_BUTTON, DFCS_BUTTONCHECK | DFCS_HOT);
|
| 799 | + else DrawFrameControl(drawitem->hDC, &r, DFC_BUTTON, DFCS_BUTTONCHECK);
|
| 800 | + }
|
| 801 | + }
|
| 802 | + drawitem->rcItem.left += GetSystemMetrics(SM_CXMENUCHECK) + 5;
|
| 803 | + }
|
| 804 | + combotext[0] = 0;
|
| 805 | + if (drawitem->itemID != -1 && !(drawitem->itemState & ODS_COMBOBOXEDIT))
|
| 806 | + SendDlgItemMessage(hWnd, IDC_COLORDEPTH, CB_GETLBTEXT, drawitem->itemID, combotext);
|
| 807 | + else _tcscpy(combotext, colormodes[cfg->AddColorDepths & 31]);
|
| 808 | + DrawText(drawitem->hDC, combotext, _tcslen(combotext), &drawitem->rcItem,
|
| 809 | + DT_LEFT | DT_SINGLELINE | DT_VCENTER);
|
| 810 | + SetTextColor(drawitem->hDC, OldTextColor);
|
| 811 | + SetBkColor(drawitem->hDC, OldBackColor);
|
| 812 | + if (drawitem->itemID != -1 && !(drawitem->itemState & ODS_COMBOBOXEDIT))
|
| 813 | + drawitem->rcItem.left -= GetSystemMetrics(SM_CXMENUCHECK) + 5;
|
| 814 | + if (drawitem->itemState & ODS_FOCUS) DrawFocusRect(drawitem->hDC, &drawitem->rcItem);
|
| 815 | + DefWindowProc(hWnd, Msg, wParam, lParam);
|
| 816 | + break;
|
747 | 817 | case IDC_EXTRAMODES:
|
748 | 818 | OldTextColor = GetTextColor(drawitem->hDC);
|
749 | 819 | OldBackColor = GetBkColor(drawitem->hDC);
|
— | — | @@ -847,6 +917,28 @@ |
848 | 918 | {
|
849 | 919 | switch (LOWORD(wParam))
|
850 | 920 | {
|
| 921 | + case IDC_COLORDEPTH:
|
| 922 | + if (HIWORD(wParam) == CBN_SELENDOK)
|
| 923 | + {
|
| 924 | + if (ColorDepth_Dropdown)
|
| 925 | + {
|
| 926 | + cursel = SendDlgItemMessage(hWnd, IDC_COLORDEPTH, CB_GETCURSEL, 0, 0);
|
| 927 | + i = ((cfg->AddColorDepths >> cursel) & 1);
|
| 928 | + if (i) cfg->AddColorDepths &= ~(1 << cursel);
|
| 929 | + else cfg->AddColorDepths |= 1 << cursel;
|
| 930 | + EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
|
| 931 | + *dirty = TRUE;
|
| 932 | + }
|
| 933 | + }
|
| 934 | + if (HIWORD(wParam) == CBN_DROPDOWN)
|
| 935 | + {
|
| 936 | + ColorDepth_Dropdown = TRUE;
|
| 937 | + }
|
| 938 | + if (HIWORD(wParam) == CBN_CLOSEUP)
|
| 939 | + {
|
| 940 | + ColorDepth_Dropdown = FALSE;
|
| 941 | + }
|
| 942 | + break;
|
851 | 943 | case IDC_EXTRAMODES:
|
852 | 944 | if (HIWORD(wParam) == CBN_SELENDOK)
|
853 | 945 | {
|
— | — | @@ -868,9 +960,57 @@ |
869 | 961 | {
|
870 | 962 | ExtraModes_Dropdown = FALSE;
|
871 | 963 | }
|
872 | | - /*cfg->ExtraModes = GetCheck(hWnd,IDC_EXTRAMODES,&cfgmask->ExtraModes);
|
873 | | - */
|
874 | 964 | break;
|
| 965 | + case IDC_VIDMODE:
|
| 966 | + cfg->scaler = GetCombo(hWnd, IDC_VIDMODE, &cfgmask->scaler);
|
| 967 | + EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
|
| 968 | + *dirty = TRUE;
|
| 969 | + break;
|
| 970 | + case IDC_SCALE:
|
| 971 | + cfg->scalingfilter = GetCombo(hWnd, IDC_SCALE, &cfgmask->scalingfilter);
|
| 972 | + EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
|
| 973 | + *dirty = TRUE;
|
| 974 | + break;
|
| 975 | + case IDC_ASPECT:
|
| 976 | + if (HIWORD(wParam) == CBN_KILLFOCUS)
|
| 977 | + {
|
| 978 | + cfg->aspect = GetAspectCombo(hWnd, IDC_ASPECT, &cfgmask->aspect);
|
| 979 | + SetAspectCombo(hWnd, IDC_ASPECT, cfg->aspect, cfgmask->aspect, tristate);
|
| 980 | + EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
|
| 981 | + *dirty = TRUE;
|
| 982 | + }
|
| 983 | + else if (HIWORD(wParam) == CBN_SELCHANGE)
|
| 984 | + {
|
| 985 | + cfg->aspect = GetAspectCombo(hWnd, IDC_ASPECT, &cfgmask->aspect);
|
| 986 | + EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
|
| 987 | + *dirty = TRUE;
|
| 988 | + }
|
| 989 | + break;
|
| 990 | + case IDC_SORTMODES:
|
| 991 | + cfg->SortModes = GetCombo(hWnd, IDC_SORTMODES, &cfgmask->SortModes);
|
| 992 | + EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
|
| 993 | + *dirty = TRUE;
|
| 994 | + break;
|
| 995 | + case IDC_DPISCALE:
|
| 996 | + cfg->DPIScale = GetCombo(hWnd, IDC_DPISCALE, &cfgmask->DPIScale);
|
| 997 | + EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
|
| 998 | + *dirty = TRUE;
|
| 999 | + break;
|
| 1000 | + case IDC_VSYNC:
|
| 1001 | + cfg->vsync = GetCombo(hWnd, IDC_VSYNC, &cfgmask->vsync);
|
| 1002 | + EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
|
| 1003 | + *dirty = TRUE;
|
| 1004 | + break;
|
| 1005 | + case IDC_FULLMODE:
|
| 1006 | + cfg->fullmode = GetCombo(hWnd, IDC_FULLMODE, &cfgmask->fullmode);
|
| 1007 | + EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
|
| 1008 | + *dirty = TRUE;
|
| 1009 | + break;
|
| 1010 | + case IDC_COLOR:
|
| 1011 | + cfg->colormode = GetCheck(hWnd, IDC_COLOR, &cfgmask->colormode);
|
| 1012 | + EnableWindow(GetDlgItem(hDialog, IDC_APPLY), TRUE);
|
| 1013 | + *dirty = TRUE;
|
| 1014 | + break;
|
875 | 1015 | }
|
876 | 1016 | }
|
877 | 1017 | default:
|
— | — | @@ -1329,9 +1469,9 @@ |
1330 | 1470 | SendDlgItemMessage(hTabs[0],IDC_SORTMODES,CB_ADDSTRING,2,(LPARAM)buffer);
|
1331 | 1471 | SendDlgItemMessage(hTabs[0],IDC_SORTMODES,CB_SETCURSEL,cfg->SortModes,0);
|
1332 | 1472 | // color depths
|
1333 | | - for (i = 0; i < 32; i++)
|
| 1473 | + for (i = 0; i < 5; i++)
|
1334 | 1474 | {
|
1335 | | - _tcscpy(buffer, colormodes[i]);
|
| 1475 | + _tcscpy(buffer, colormodedropdown[i]);
|
1336 | 1476 | SendDlgItemMessage(hTabs[0], IDC_COLORDEPTH, CB_ADDSTRING, i, (LPARAM)buffer);
|
1337 | 1477 | }
|
1338 | 1478 | SendDlgItemMessage(hTabs[0], IDC_COLORDEPTH, CB_SETCURSEL, cfg->AddColorDepths, 0);
|
— | — | @@ -1361,8 +1501,8 @@ |
1362 | 1502 | _tcscpy(buffer, _T("Windows AppCompat"));
|
1363 | 1503 | SendDlgItemMessage(hTabs[0],IDC_DPISCALE,CB_ADDSTRING,2,(LPARAM)buffer);
|
1364 | 1504 | SendDlgItemMessage(hTabs[0],IDC_DPISCALE,CB_SETCURSEL,cfg->DPIScale,0);
|
1365 | | - //EnableWindow(GetDlgItem(hWnd, IDC_PATHLABEL), FALSE);
|
1366 | | - //EnableWindow(GetDlgItem(hWnd, IDC_PROFILEPATH), FALSE);
|
| 1505 | + EnableWindow(GetDlgItem(hTabs[3], IDC_PATHLABEL), FALSE);
|
| 1506 | + EnableWindow(GetDlgItem(hTabs[3], IDC_PROFILEPATH), FALSE);
|
1367 | 1507 | // Check install path
|
1368 | 1508 | installpath = NULL;
|
1369 | 1509 | error = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("Software\\DXGL"), 0, KEY_READ, &hKey);
|
— | — | @@ -1614,9 +1754,9 @@ |
1615 | 1755 | SaveChanges(hWnd);
|
1616 | 1756 | return TRUE;
|
1617 | 1757 | case IDC_APPS:
|
1618 | | - if(HIWORD(wParam) == LBN_SELCHANGE)
|
| 1758 | + if(HIWORD(wParam) == CBN_SELCHANGE)
|
1619 | 1759 | {
|
1620 | | - cursel = SendDlgItemMessage(hWnd,IDC_APPS,LB_GETCURSEL,0,0);
|
| 1760 | + cursel = SendDlgItemMessage(hWnd,IDC_APPS,CB_GETCURSEL,0,0);
|
1621 | 1761 | if(cursel == current_app) break;
|
1622 | 1762 | current_app = cursel;
|
1623 | 1763 | cfg = &apps[current_app].cfg;
|
— | — | @@ -1624,56 +1764,74 @@ |
1625 | 1765 | dirty = &apps[current_app].dirty;
|
1626 | 1766 | if (current_app)
|
1627 | 1767 | {
|
1628 | | -// EnableWindow(GetDlgItem(hWnd, IDC_PATHLABEL), TRUE);
|
1629 | | -// EnableWindow(GetDlgItem(hWnd, IDC_PROFILEPATH), TRUE);
|
1630 | | -// SetDlgItemText(hWnd, IDC_PROFILEPATH, apps[current_app].path);
|
1631 | | - EnableWindow(GetDlgItem(hWnd, IDC_REMOVE), TRUE);
|
| 1768 | + EnableWindow(GetDlgItem(hTabs[3], IDC_PATHLABEL), TRUE);
|
| 1769 | + EnableWindow(GetDlgItem(hTabs[3], IDC_PROFILEPATH), TRUE);
|
| 1770 | + SetDlgItemText(hTabs[3], IDC_PROFILEPATH, apps[current_app].path);
|
| 1771 | + if (apps[current_app].builtin) EnableWindow(GetDlgItem(hWnd, IDC_REMOVE), FALSE);
|
| 1772 | + else EnableWindow(GetDlgItem(hWnd, IDC_REMOVE), TRUE);
|
1632 | 1773 | }
|
1633 | 1774 | else
|
1634 | 1775 | {
|
1635 | | -// EnableWindow(GetDlgItem(hWnd, IDC_PATHLABEL), FALSE);
|
1636 | | -// EnableWindow(GetDlgItem(hWnd, IDC_PROFILEPATH), FALSE);
|
1637 | | -// SetDlgItemText(hWnd, IDC_PROFILEPATH, _T(""));
|
| 1776 | + EnableWindow(GetDlgItem(hTabs[3], IDC_PATHLABEL), FALSE);
|
| 1777 | + EnableWindow(GetDlgItem(hTabs[3], IDC_PROFILEPATH), FALSE);
|
| 1778 | + SetDlgItemText(hTabs[3], IDC_PROFILEPATH, _T(""));
|
1638 | 1779 | EnableWindow(GetDlgItem(hWnd, IDC_REMOVE), FALSE);
|
1639 | 1780 | }
|
1640 | | - /* // Set 3-state status
|
| 1781 | + // Set 3-state status
|
1641 | 1782 | if(current_app && !tristate)
|
1642 | 1783 | {
|
1643 | 1784 | tristate = TRUE;
|
1644 | | - SendDlgItemMessage(hWnd,IDC_VIDMODE,CB_ADDSTRING,0,(LPARAM)strdefault);
|
1645 | | - SendDlgItemMessage(hWnd,IDC_SORTMODES,CB_ADDSTRING,0,(LPARAM)strdefault);
|
| 1785 | + // Display tab
|
| 1786 | + SendDlgItemMessage(hTabs[0], IDC_VIDMODE, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
| 1787 | + SendDlgItemMessage(hTabs[0], IDC_COLORDEPTH, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
| 1788 | + SendDlgItemMessage(hTabs[0], IDC_SCALE, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
| 1789 | + SendDlgItemMessage(hTabs[0], IDC_EXTRAMODES, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
| 1790 | + SendDlgItemMessage(hTabs[0], IDC_ASPECT, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
| 1791 | + SendDlgItemMessage(hTabs[0], IDC_SORTMODES, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
| 1792 | + SendDlgItemMessage(hTabs[0], IDC_DPISCALE, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
| 1793 | + SendDlgItemMessage(hTabs[0], IDC_VSYNC, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
| 1794 | + SendDlgItemMessage(hTabs[0], IDC_FULLMODE, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
| 1795 | + SendDlgItemMessage(hTabs[0], IDC_COLOR, BM_SETSTYLE, BS_AUTO3STATE, (LPARAM)TRUE);
|
| 1796 | + /*
|
1646 | 1797 | SendDlgItemMessage(hWnd, IDC_POSTSCALE, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
1647 | 1798 | SendDlgItemMessage(hWnd, IDC_POSTSCALESIZE, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
1648 | | - SendDlgItemMessage(hWnd,IDC_SCALE,CB_ADDSTRING,0,(LPARAM)strdefault);
|
1649 | | - SendDlgItemMessage(hWnd,IDC_VSYNC,CB_ADDSTRING,0,(LPARAM)strdefault);
|
1650 | 1799 | SendDlgItemMessage(hWnd,IDC_MSAA,CB_ADDSTRING,0,(LPARAM)strdefault);
|
1651 | 1800 | SendDlgItemMessage(hWnd,IDC_ANISO,CB_ADDSTRING,0,(LPARAM)strdefault);
|
1652 | 1801 | SendDlgItemMessage(hWnd,IDC_TEXFILTER,CB_ADDSTRING,0,(LPARAM)strdefault);
|
1653 | 1802 | SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_ADDSTRING,0,(LPARAM)strdefault);
|
1654 | | - SendDlgItemMessage(hWnd,IDC_COLOR,BM_SETSTYLE,BS_AUTO3STATE,(LPARAM)TRUE);
|
1655 | | - SendDlgItemMessage(hWnd,IDC_HIGHRES,BM_SETSTYLE,BS_AUTO3STATE,(LPARAM)TRUE);
|
1656 | | - SendDlgItemMessage(hWnd,IDC_UNCOMMONCOLOR,BM_SETSTYLE,BS_AUTO3STATE,(LPARAM)TRUE);
|
1657 | | - SendDlgItemMessage(hWnd,IDC_EXTRAMODES,BM_SETSTYLE,BS_AUTO3STATE,(LPARAM)TRUE);
|
| 1803 | + SendDlgItemMessage(hTabs[0], IDC_HIGHRES, BM_SETSTYLE, BS_AUTO3STATE, (LPARAM)TRUE);
|
1658 | 1804 | SendDlgItemMessage(hWnd,IDC_TEXTUREFORMAT,CB_ADDSTRING,0,(LPARAM)strdefault);
|
1659 | 1805 | SendDlgItemMessage(hWnd,IDC_TEXUPLOAD,CB_ADDSTRING,0,(LPARAM)strdefault);
|
1660 | | - SendDlgItemMessage(hWnd, IDC_DPISCALE, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
1661 | | - SendDlgItemMessage(hWnd, IDC_ASPECT, CB_ADDSTRING, 0, (LPARAM)strdefault);
|
| 1806 | + */
|
1662 | 1807 | }
|
1663 | 1808 | else if(!current_app && tristate)
|
1664 | 1809 | {
|
1665 | 1810 | tristate = FALSE;
|
1666 | | - SendDlgItemMessage(hWnd,IDC_VIDMODE,CB_DELETESTRING,
|
1667 | | - SendDlgItemMessage(hWnd,IDC_VIDMODE,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
|
1668 | | - SendDlgItemMessage(hWnd,IDC_SORTMODES,CB_DELETESTRING,
|
1669 | | - SendDlgItemMessage(hWnd,IDC_SORTMODES,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
|
| 1811 | + // Display tab
|
| 1812 | + SendDlgItemMessage(hTabs[0], IDC_VIDMODE, CB_DELETESTRING,
|
| 1813 | + SendDlgItemMessage(hTabs[0], IDC_VIDMODE, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
| 1814 | + SendDlgItemMessage(hTabs[0], IDC_COLORDEPTH, CB_DELETESTRING,
|
| 1815 | + SendDlgItemMessage(hTabs[0], IDC_COLORDEPTH, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
| 1816 | + SendDlgItemMessage(hTabs[0], IDC_SCALE, CB_DELETESTRING,
|
| 1817 | + SendDlgItemMessage(hTabs[0], IDC_SCALE, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
| 1818 | + SendDlgItemMessage(hTabs[0], IDC_EXTRAMODES, CB_DELETESTRING,
|
| 1819 | + SendDlgItemMessage(hTabs[0], IDC_EXTRAMODES, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
| 1820 | + SendDlgItemMessage(hTabs[0], IDC_ASPECT, CB_DELETESTRING,
|
| 1821 | + SendDlgItemMessage(hTabs[0], IDC_ASPECT, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
| 1822 | + SendDlgItemMessage(hTabs[0], IDC_SORTMODES, CB_DELETESTRING,
|
| 1823 | + SendDlgItemMessage(hTabs[0], IDC_SORTMODES, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
| 1824 | + SendDlgItemMessage(hTabs[0], IDC_DPISCALE, CB_DELETESTRING,
|
| 1825 | + SendDlgItemMessage(hTabs[0], IDC_DPISCALE, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
| 1826 | + SendDlgItemMessage(hTabs[0], IDC_VSYNC, CB_DELETESTRING,
|
| 1827 | + SendDlgItemMessage(hTabs[0], IDC_VSYNC, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
| 1828 | + SendDlgItemMessage(hTabs[0], IDC_FULLMODE, CB_DELETESTRING,
|
| 1829 | + SendDlgItemMessage(hTabs[0], IDC_FULLMODE, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
| 1830 | + SendDlgItemMessage(hTabs[0], IDC_COLOR, BM_SETSTYLE, BS_AUTOCHECKBOX, (LPARAM)TRUE);
|
| 1831 | + /*
|
1670 | 1832 | SendDlgItemMessage(hWnd, IDC_POSTSCALE, CB_DELETESTRING,
|
1671 | 1833 | SendDlgItemMessage(hWnd, IDC_POSTSCALE, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
1672 | 1834 | SendDlgItemMessage(hWnd, IDC_POSTSCALESIZE, CB_DELETESTRING,
|
1673 | 1835 | SendDlgItemMessage(hWnd, IDC_POSTSCALESIZE, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
1674 | | - SendDlgItemMessage(hWnd,IDC_SCALE,CB_DELETESTRING,
|
1675 | | - SendDlgItemMessage(hWnd,IDC_SCALE,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
|
1676 | | - SendDlgItemMessage(hWnd,IDC_VSYNC,CB_DELETESTRING,
|
1677 | | - SendDlgItemMessage(hWnd,IDC_VSYNC,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
|
1678 | 1836 | SendDlgItemMessage(hWnd,IDC_MSAA,CB_DELETESTRING,
|
1679 | 1837 | SendDlgItemMessage(hWnd,IDC_MSAA,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
|
1680 | 1838 | SendDlgItemMessage(hWnd,IDC_ANISO,CB_DELETESTRING,
|
— | — | @@ -1682,30 +1840,31 @@ |
1683 | 1841 | SendDlgItemMessage(hWnd,IDC_TEXFILTER,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
|
1684 | 1842 | SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_DELETESTRING,
|
1685 | 1843 | SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
|
1686 | | - SendDlgItemMessage(hWnd,IDC_COLOR,BM_SETSTYLE,BS_AUTOCHECKBOX,(LPARAM)TRUE);
|
1687 | 1844 | SendDlgItemMessage(hWnd,IDC_HIGHRES,BM_SETSTYLE,BS_AUTOCHECKBOX,(LPARAM)TRUE);
|
1688 | | - SendDlgItemMessage(hWnd,IDC_UNCOMMONCOLOR,BM_SETSTYLE,BS_AUTOCHECKBOX,(LPARAM)TRUE);
|
1689 | | - SendDlgItemMessage(hWnd,IDC_EXTRAMODES,BM_SETSTYLE,BS_AUTOCHECKBOX,(LPARAM)TRUE);
|
1690 | 1845 | SendDlgItemMessage(hWnd,IDC_TEXTUREFORMAT,CB_DELETESTRING,
|
1691 | 1846 | SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
|
1692 | 1847 | SendDlgItemMessage(hWnd,IDC_TEXUPLOAD,CB_DELETESTRING,
|
1693 | 1848 | SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
|
1694 | | - SendDlgItemMessage(hWnd, IDC_DPISCALE, CB_DELETESTRING,
|
1695 | | - SendDlgItemMessage(hWnd, IDC_DPISCALE, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
1696 | | - SendDlgItemMessage(hWnd, IDC_ASPECT, CB_DELETESTRING,
|
1697 | | - SendDlgItemMessage(hWnd, IDC_ASPECT, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
| 1849 | + */
|
1698 | 1850 | }
|
1699 | 1851 | // Read settings into controls
|
1700 | | - SetCombo(hWnd,IDC_VIDMODE,cfg->scaler,cfgmask->scaler,tristate);
|
1701 | | - SetCombo(hWnd,IDC_SORTMODES,cfg->SortModes,cfgmask->SortModes,tristate);
|
| 1852 | + // Display tab
|
| 1853 | + SetCombo(hTabs[0], IDC_VIDMODE, cfg->scaler, cfgmask->scaler, tristate);
|
| 1854 | + SetCombo(hTabs[0], IDC_COLORDEPTH, 0, 0, tristate);
|
| 1855 | + SetCombo(hTabs[0], IDC_SCALE, cfg->scalingfilter, cfgmask->scalingfilter, tristate);
|
| 1856 | + SetCombo(hTabs[0], IDC_EXTRAMODES, 0, 0, tristate);
|
| 1857 | + SetAspectCombo(hTabs[0], IDC_ASPECT, cfg->aspect, cfgmask->aspect, tristate);
|
| 1858 | + SetCombo(hTabs[0], IDC_SORTMODES, cfg->SortModes, cfgmask->SortModes, tristate);
|
| 1859 | + SetCombo(hTabs[0], IDC_DPISCALE, cfg->DPIScale, cfgmask->DPIScale, tristate);
|
| 1860 | + SetCombo(hTabs[0], IDC_VSYNC, cfg->vsync, cfgmask->vsync, tristate);
|
| 1861 | + SetCombo(hTabs[0], IDC_FULLMODE, cfg->fullmode, cfgmask->fullmode, tristate);
|
| 1862 | + SetCheck(hTabs[0], IDC_COLOR, cfg->colormode, cfgmask->colormode, tristate);
|
| 1863 | + /*
|
1702 | 1864 | SetCombo(hWnd,IDC_POSTSCALE,cfg->firstscalefilter,cfgmask->firstscalefilter,tristate);
|
1703 | | - SetCombo(hWnd,IDC_SCALE,cfg->scalingfilter,cfgmask->scalingfilter,tristate);
|
1704 | | - SetCombo(hWnd,IDC_VSYNC,cfg->vsync,cfgmask->vsync,tristate);
|
1705 | 1865 | SetCombo(hWnd,IDC_MSAA,cfg->msaa,cfgmask->msaa,tristate);
|
1706 | 1866 | SetCombo(hWnd,IDC_ANISO,cfg->anisotropic,cfgmask->anisotropic,tristate);
|
1707 | 1867 | SetCombo(hWnd,IDC_TEXFILTER,cfg->texfilter,cfgmask->texfilter,tristate);
|
1708 | 1868 | SetCombo(hWnd,IDC_ASPECT3D,cfg->aspect3d,cfgmask->aspect3d,tristate);
|
1709 | | - SetCheck(hWnd,IDC_COLOR,cfg->colormode,cfgmask->colormode,tristate);
|
1710 | 1869 | SetCheck(hWnd,IDC_HIGHRES,cfg->highres,cfgmask->highres,tristate);
|
1711 | 1870 | SetCheck(hWnd,IDC_UNCOMMONCOLOR,cfg->AllColorDepths,cfgmask->AllColorDepths,tristate);
|
1712 | 1871 | SetCombo(hWnd,IDC_TEXTUREFORMAT,cfg->TextureFormat,cfgmask->TextureFormat,tristate);
|
— | — | @@ -1712,37 +1871,16 @@ |
1713 | 1872 | SetCombo(hWnd,IDC_TEXUPLOAD,cfg->TexUpload,cfgmask->TexUpload,tristate);
|
1714 | 1873 | SetCheck(hWnd,IDC_EXTRAMODES,cfg->ExtraModes,cfgmask->ExtraModes,tristate);
|
1715 | 1874 | SetText(hWnd,IDC_SHADER,cfg->shaderfile,cfgmask->shaderfile,tristate);
|
1716 | | - SetCombo(hWnd, IDC_DPISCALE, cfg->DPIScale, cfgmask->DPIScale, tristate);
|
1717 | 1875 | SetPostScaleCombo(hWnd, IDC_POSTSCALESIZE, cfg->firstscalex, cfg->firstscaley,
|
1718 | 1876 | cfgmask->firstscalex, cfgmask->firstscaley, tristate);
|
1719 | | - SetAspectCombo(hWnd, IDC_ASPECT, cfg->aspect, cfgmask->aspect, tristate);*/
|
| 1877 | + */
|
1720 | 1878 | }
|
1721 | | - break;
|
1722 | | -/* case IDC_VIDMODE:
|
1723 | | - cfg->scaler = GetCombo(hWnd,IDC_VIDMODE,&cfgmask->scaler);
|
1724 | | - EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
|
1725 | | - *dirty = TRUE;
|
1726 | | - break;
|
1727 | | - case IDC_SORTMODES:
|
1728 | | - cfg->SortModes = GetCombo(hWnd,IDC_SORTMODES,&cfgmask->SortModes);
|
1729 | | - EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
|
1730 | | - *dirty = TRUE;
|
1731 | | - break;
|
| 1879 | + break;/*
|
1732 | 1880 | case IDC_POSTSCALE:
|
1733 | 1881 | cfg->firstscalefilter = GetCombo(hWnd,IDC_POSTSCALE,&cfgmask->firstscalefilter);
|
1734 | 1882 | EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
|
1735 | 1883 | *dirty = TRUE;
|
1736 | 1884 | break;
|
1737 | | - case IDC_SCALE:
|
1738 | | - cfg->scalingfilter = GetCombo(hWnd,IDC_SCALE,&cfgmask->scalingfilter);
|
1739 | | - EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
|
1740 | | - *dirty = TRUE;
|
1741 | | - break;
|
1742 | | - case IDC_VSYNC:
|
1743 | | - cfg->vsync = GetCombo(hWnd,IDC_VSYNC,&cfgmask->vsync);
|
1744 | | - EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
|
1745 | | - *dirty = TRUE;
|
1746 | | - break;
|
1747 | 1885 | case IDC_MSAA:
|
1748 | 1886 | cfg->msaa = GetCombo(hWnd,IDC_MSAA,&cfgmask->msaa);
|
1749 | 1887 | EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
|
— | — | @@ -1763,11 +1901,6 @@ |
1764 | 1902 | EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
|
1765 | 1903 | *dirty = TRUE;
|
1766 | 1904 | break;
|
1767 | | - case IDC_COLOR:
|
1768 | | - cfg->colormode = GetCheck(hWnd,IDC_COLOR,&cfgmask->colormode);
|
1769 | | - EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
|
1770 | | - *dirty = TRUE;
|
1771 | | - break;
|
1772 | 1905 | case IDC_HIGHRES:
|
1773 | 1906 | cfg->highres = GetCheck(hWnd,IDC_HIGHRES,&cfgmask->highres);
|
1774 | 1907 | EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
|
— | — | @@ -1788,11 +1921,6 @@ |
1789 | 1922 | EnableWindow(GetDlgItem(hWnd,IDC_APPLY),TRUE);
|
1790 | 1923 | *dirty = TRUE;
|
1791 | 1924 | break;
|
1792 | | - case IDC_DPISCALE:
|
1793 | | - cfg->DPIScale = GetCombo(hWnd,IDC_DPISCALE,&cfgmask->DPIScale);
|
1794 | | - EnableWindow(GetDlgItem(hWnd, IDC_APPLY), TRUE);
|
1795 | | - *dirty = TRUE;
|
1796 | | - break;
|
1797 | 1925 | case IDC_POSTSCALESIZE:
|
1798 | 1926 | if (HIWORD(wParam) == CBN_KILLFOCUS)
|
1799 | 1927 | {
|
— | — | @@ -1819,21 +1947,7 @@ |
1820 | 1948 | *dirty = TRUE;
|
1821 | 1949 | }
|
1822 | 1950 | break;
|
1823 | | - case IDC_ASPECT:
|
1824 | | - if (HIWORD(wParam) == CBN_KILLFOCUS)
|
1825 | | - {
|
1826 | | - cfg->aspect = GetAspectCombo(hWnd, IDC_ASPECT, &cfgmask->aspect);
|
1827 | | - SetAspectCombo(hWnd, IDC_ASPECT, cfg->aspect, cfgmask->aspect, tristate);
|
1828 | | - EnableWindow(GetDlgItem(hWnd, IDC_APPLY), TRUE);
|
1829 | | - *dirty = TRUE;
|
1830 | | - }
|
1831 | | - else if (HIWORD(wParam) == CBN_SELCHANGE)
|
1832 | | - {
|
1833 | | - cfg->aspect = GetAspectCombo(hWnd, IDC_ASPECT, &cfgmask->aspect);
|
1834 | | - EnableWindow(GetDlgItem(hWnd, IDC_APPLY), TRUE);
|
1835 | | - *dirty = TRUE;
|
1836 | | - }
|
1837 | | - break;*/
|
| 1951 | +*/
|
1838 | 1952 | case IDC_ADD:
|
1839 | 1953 | selectedfile[0] = 0;
|
1840 | 1954 | ZeroMemory(&filename, OPENFILENAME_SIZE_VERSION_400);
|
Index: dxglcfg2/dxglcfg2.rc |
— | — | @@ -40,9 +40,9 @@ |
41 | 41 | CONTROL "", IDC_TABS, WC_TABCONTROL, 0, 7, 35, 344, 185, WS_EX_LEFT
|
42 | 42 | PUSHBUTTON "A&dd...", IDC_ADD, 7, 223, 50, 14, 0, WS_EX_LEFT
|
43 | 43 | PUSHBUTTON "&Remove", IDC_REMOVE, 59, 223, 50, 14, WS_DISABLED, WS_EX_LEFT
|
44 | | - DEFPUSHBUTTON "OK", IDOK, 140, 223, 50, 14, 0, WS_EX_LEFT
|
45 | | - PUSHBUTTON "Cancel", IDCANCEL, 192, 223, 50, 14, 0, WS_EX_LEFT
|
46 | | - PUSHBUTTON "&Apply", IDC_APPLY, 244, 223, 50, 14, WS_DISABLED, WS_EX_LEFT
|
| 44 | + DEFPUSHBUTTON "OK", IDOK, 195, 223, 50, 14, 0, WS_EX_LEFT
|
| 45 | + PUSHBUTTON "Cancel", IDCANCEL, 247, 223, 50, 14, 0, WS_EX_LEFT
|
| 46 | + PUSHBUTTON "&Apply", IDC_APPLY, 299, 223, 50, 14, WS_DISABLED, WS_EX_LEFT
|
47 | 47 | }
|
48 | 48 |
|
49 | 49 |
|
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | LTEXT "Video mode", IDC_STATIC, 7, 7, 38, 8, SS_LEFT, WS_EX_LEFT
|
57 | 57 | COMBOBOX IDC_VIDMODE, 7, 17, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
|
58 | 58 | LTEXT "Add color depths", IDC_STATIC, 114, 7, 54, 8, SS_LEFT, WS_EX_LEFT
|
59 | | - COMBOBOX IDC_COLORDEPTH, 114, 17, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
|
| 59 | + COMBOBOX IDC_COLORDEPTH, 114, 17, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_OWNERDRAWFIXED, WS_EX_LEFT
|
60 | 60 | LTEXT "Scaling method", IDC_STATIC, 7, 32, 49, 9, SS_LEFT, WS_EX_LEFT
|
61 | 61 | COMBOBOX IDC_SCALE, 7, 43, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
|
62 | 62 | LTEXT "Additional display modes", IDC_STATIC, 114, 32, 78, 8, SS_LEFT, WS_EX_LEFT
|
— | — | @@ -110,7 +110,9 @@ |
111 | 111 | LTEXT "Display name", 0, 7, 35, 43, 9, SS_LEFT, WS_EX_LEFT
|
112 | 112 | EDITTEXT IDC_DISPLAYNAME, 7, 46, 209, 14, ES_AUTOHSCROLL, WS_EX_LEFT
|
113 | 113 | LTEXT "Low color rendering", 0, 7, 65, 63, 9, SS_LEFT, WS_EX_LEFT
|
114 | | - COMBOBOX IDC_LOWCOLORRENDER, 5, 76, 104, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
|
| 114 | + COMBOBOX IDC_LOWCOLORRENDER, 7, 76, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
|
| 115 | + LTEXT "Installation path", IDC_PATHLABEL, 7, 94, 50, 9, SS_LEFT, WS_EX_LEFT
|
| 116 | + EDITTEXT IDC_PROFILEPATH, 7, 105, 209, 14, NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL | ES_READONLY, WS_EX_LEFT
|
115 | 117 | PUSHBUTTON "Write INI file...", IDC_WRITEINI, 203, 151, 73, 14, 0, WS_EX_LEFT
|
116 | 118 | }
|
117 | 119 |
|
— | — | @@ -133,12 +135,12 @@ |
134 | 136 | {
|
135 | 137 | LTEXT "Postprocess scaler", IDC_STATIC, 7, 5, 60, 9, SS_LEFT, WS_EX_LEFT
|
136 | 138 | COMBOBOX IDC_POSTSCALE, 7, 15, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
|
137 | | - LTEXT "Postprocess input miultiplier", 0, 114, 5, 86, 9, SS_LEFT, WS_EX_LEFT
|
| 139 | + LTEXT "Postprocess input miultiplier", IDC_STATIC, 114, 5, 86, 9, SS_LEFT, WS_EX_LEFT
|
138 | 140 | COMBOBOX IDC_POSTSCALESIZE, 114, 15, 102, 30, CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
|
139 | 141 | AUTOCHECKBOX "Use post-processing shader", IDC_USESHADER, 7, 34, 103, 8, 0, WS_EX_LEFT
|
140 | 142 | COMBOBOX IDC_SHADER, 7, 44, 247, 92, WS_DISABLED | CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
|
141 | 143 | PUSHBUTTON "...", IDC_BROWSESHADER, 256, 43, 20, 14, WS_DISABLED, WS_EX_LEFT
|
142 | | - LTEXT "Primary buffer scaling", 0, 7, 60, 68, 8, SS_LEFT, WS_EX_LEFT
|
| 144 | + LTEXT "Primary buffer scaling", IDC_STATIC, 7, 60, 68, 8, SS_LEFT, WS_EX_LEFT
|
143 | 145 | COMBOBOX IDC_PRIMARYSCALE, 7, 70, 101, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
|
144 | 146 | LTEXT "Custom scale", IDC_CUSTOMSCALELABEL, 7, 85, 43, 8, WS_DISABLED | SS_LEFT, WS_EX_LEFT
|
145 | 147 | LTEXT "X", IDC_CUSTOMSCALELABELX, 7, 98, 8, 8, WS_DISABLED | SS_LEFT, WS_EX_LEFT
|
Index: dxglcfg2/resource.h |
— | — | @@ -87,7 +87,9 @@ |
88 | 88 | #define IDC_TEXUPLOAD 2302
|
89 | 89 | #define IDC_DISPLAYNAME 2303
|
90 | 90 | #define IDC_LOWCOLORRENDER 2304
|
91 | | -#define IDC_WRITEINI 2305
|
| 91 | +#define IDC_PATHLABEL 2305
|
| 92 | +#define IDC_PROFILEPATH 2306
|
| 93 | +#define IDC_WRITEINI 2307
|
92 | 94 |
|
93 | 95 | // Controls - Debug Tab
|
94 | 96 | #define IDC_DEBUGLIST 2401
|