Index: cfgmgr/ReadMe.txt |
— | — | @@ -32,10 +32,12 @@ |
33 | 33 | 0 - Use native primary surface size. Most compatible.
|
34 | 34 | 1 - Adjust primary surface size to match display.
|
35 | 35 | 2 - Adjust primary surface to nearest integer multiple of native.
|
36 | | -3 - Use exact 2x scale.
|
37 | | -4 - Use exact 3x scale.
|
38 | | -5 - Use exact 4x scale.
|
39 | | -6 - Use custom scale.
|
| 36 | +3 - Use exact 1.5x scale.
|
| 37 | +4 - Use exact 2x scale.
|
| 38 | +5 - Use exact 2.5x scale.
|
| 39 | +6 - Use exact 3x scale.
|
| 40 | +7 - Use exact 4x scale.
|
| 41 | +8 - Use custom scale.
|
40 | 42 |
|
41 | 43 | Member primaryscalex
|
42 | 44 | REG_DWORD HKCU\DXGL\<app>\PrimaryScaleX
|
Index: cfgmgr/cfgmgr.c |
— | — | @@ -442,7 +442,7 @@ |
443 | 443 | cfg->primaryscaley = ReadFloat(hKey,cfg->primaryscaley,&cfgmask->primaryscaley,_T("PrimaryScaleY"));
|
444 | 444 | ReadPath(hKey,cfg->shaderfile,cfgmask->shaderfile,_T("ShaderFile"));
|
445 | 445 | cfg->SortModes = ReadDWORD(hKey,cfg->SortModes,&cfgmask->SortModes,_T("SortModes"));
|
446 | | - cfg->AddColorDepths = ReadDeprecatedBool(hKey, cfg->AddColorDepths, &cfgmask->AddColorDepths, _T("AddColorDepths"), 1 | 4 | 16, 0);
|
| 446 | + cfg->AddColorDepths = ReadDeprecatedBool(hKey, cfg->AddColorDepths, &cfgmask->AddColorDepths, _T("AllColorDepths"), 1 | 4 | 16, 0);
|
447 | 447 | cfg->AddColorDepths = ReadDWORD(hKey,cfg->AddColorDepths,&cfgmask->AddColorDepths,_T("AddColorDepths"));
|
448 | 448 | cfg->AddModes = ReadDeprecatedBool(hKey, cfg->AddModes, &cfgmask->AddModes, _T("ExtraModes"),7,0);
|
449 | 449 | cfg->AddModes = ReadDWORD(hKey, cfg->AddModes, &cfgmask->AddModes, _T("AddModes"));
|
Index: dxglcfg2/dxglcfg2.c |
— | — | @@ -22,6 +22,7 @@ |
23 | 23 | #include <stdlib.h>
|
24 | 24 | #include <crtdbg.h>
|
25 | 25 | #include <windows.h>
|
| 26 | +#include <windowsx.h>
|
26 | 27 | #include <HtmlHelp.h>
|
27 | 28 | #include <CommCtrl.h>
|
28 | 29 | #include <string.h>
|
— | — | @@ -79,6 +80,45 @@ |
80 | 81 | HWND hTabs[5];
|
81 | 82 | int tabopen;
|
82 | 83 |
|
| 84 | +static const TCHAR *colormodes[32] = {
|
| 85 | + _T("None"),
|
| 86 | + _T("8-bit"),
|
| 87 | + _T("15-bit"),
|
| 88 | + _T("8/15-bit"),
|
| 89 | + _T("16-bit"),
|
| 90 | + _T("8/16-bit"),
|
| 91 | + _T("8/15-bit"),
|
| 92 | + _T("8/15/16-bit"),
|
| 93 | + _T("24-bit"),
|
| 94 | + _T("8/24-bit"),
|
| 95 | + _T("15/24-bit"),
|
| 96 | + _T("8/15/24-bit"),
|
| 97 | + _T("16/24-bit"),
|
| 98 | + _T("8/16/24-bit"),
|
| 99 | + _T("8/15/24-bit"),
|
| 100 | + _T("8/15/16/24-bit"),
|
| 101 | + _T("32-bit"),
|
| 102 | + _T("8/32-bit"),
|
| 103 | + _T("15/32-bit"),
|
| 104 | + _T("8/15/32-bit"),
|
| 105 | + _T("16/32-bit"),
|
| 106 | + _T("8/16/32-bit"),
|
| 107 | + _T("8/15/32-bit"),
|
| 108 | + _T("8/15/16/32-bit"),
|
| 109 | + _T("24/32-bit"),
|
| 110 | + _T("8/24/32-bit"),
|
| 111 | + _T("15/24/32-bit"),
|
| 112 | + _T("8/15/24/32-bit"),
|
| 113 | + _T("16/24/32-bit"),
|
| 114 | + _T("8/16/24/32-bit"),
|
| 115 | + _T("8/15/24/32-bit"),
|
| 116 | + _T("8/15/16/24/32-bit")
|
| 117 | +};
|
| 118 | +
|
| 119 | +LRESULT CALLBACK CheckedComboProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
| 120 | +{
|
| 121 | +}
|
| 122 | +
|
83 | 123 | DWORD AddApp(LPCTSTR path, BOOL copyfile, BOOL admin)
|
84 | 124 | {
|
85 | 125 | BOOL installed = FALSE;
|
— | — | @@ -310,6 +350,30 @@ |
311 | 351 | SendDlgItemMessage(hWnd,DlgItem,CB_SETCURSEL,value,0);
|
312 | 352 | }
|
313 | 353 |
|
| 354 | +__inline DWORD EncodePrimaryScale(DWORD scale)
|
| 355 | +{
|
| 356 | + switch (scale)
|
| 357 | + {
|
| 358 | + case 0:
|
| 359 | + return 2;
|
| 360 | + case 1:
|
| 361 | + return 0;
|
| 362 | + case 2:
|
| 363 | + return 1;
|
| 364 | + default:
|
| 365 | + return scale;
|
| 366 | + }
|
| 367 | +}
|
| 368 | +
|
| 369 | +void SetPrimaryScaleCombo(HWND hWnd, int DlgItem, DWORD value, DWORD mask, BOOL tristate)
|
| 370 | +{
|
| 371 | + if (tristate && !mask)
|
| 372 | + SendDlgItemMessage(hWnd, DlgItem, CB_SETCURSEL,
|
| 373 | + SendDlgItemMessage(hWnd, DlgItem, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
|
| 374 | + else
|
| 375 | + SendDlgItemMessage(hWnd, DlgItem, CB_SETCURSEL, EncodePrimaryScale(value), 0);
|
| 376 | +}
|
| 377 | +
|
314 | 378 | void SetAspectCombo(HWND hWnd, int DlgItem, float value, DWORD mask, BOOL tristate)
|
315 | 379 | {
|
316 | 380 | TCHAR buffer[32];
|
— | — | @@ -605,114 +669,130 @@ |
606 | 670 | tabopen = 0;
|
607 | 671 |
|
608 | 672 | // Load global settings.
|
609 | | -/* // scaler
|
| 673 | + // scaler
|
610 | 674 | _tcscpy(buffer,_T("Change desktop resolution"));
|
611 | | - SendDlgItemMessage(hWnd,IDC_VIDMODE,CB_ADDSTRING,0,(LPARAM)buffer);
|
| 675 | + SendDlgItemMessage(hTabs[0], IDC_VIDMODE, CB_ADDSTRING, 0, (LPARAM)buffer);
|
612 | 676 | _tcscpy(buffer,_T("Stretch to screen"));
|
613 | | - SendDlgItemMessage(hWnd,IDC_VIDMODE,CB_ADDSTRING,1,(LPARAM)buffer);
|
| 677 | + SendDlgItemMessage(hTabs[0],IDC_VIDMODE,CB_ADDSTRING,1,(LPARAM)buffer);
|
614 | 678 | _tcscpy(buffer,_T("Aspect corrected stretch"));
|
615 | | - SendDlgItemMessage(hWnd,IDC_VIDMODE,CB_ADDSTRING,2,(LPARAM)buffer);
|
| 679 | + SendDlgItemMessage(hTabs[0], IDC_VIDMODE, CB_ADDSTRING, 2, (LPARAM)buffer);
|
616 | 680 | _tcscpy(buffer,_T("Center image on screen"));
|
617 | | - SendDlgItemMessage(hWnd,IDC_VIDMODE,CB_ADDSTRING,3,(LPARAM)buffer);
|
| 681 | + SendDlgItemMessage(hTabs[0], IDC_VIDMODE, CB_ADDSTRING, 3, (LPARAM)buffer);
|
618 | 682 | _tcscpy(buffer,_T("Stretch if mode not found"));
|
619 | | - SendDlgItemMessage(hWnd,IDC_VIDMODE,CB_ADDSTRING,4,(LPARAM)buffer);
|
| 683 | + SendDlgItemMessage(hTabs[0], IDC_VIDMODE, CB_ADDSTRING, 4, (LPARAM)buffer);
|
620 | 684 | _tcscpy(buffer,_T("Scale if mode not found"));
|
621 | | - SendDlgItemMessage(hWnd,IDC_VIDMODE,CB_ADDSTRING,5,(LPARAM)buffer);
|
| 685 | + SendDlgItemMessage(hTabs[0], IDC_VIDMODE, CB_ADDSTRING, 5, (LPARAM)buffer);
|
622 | 686 | _tcscpy(buffer,_T("Center if mode not found"));
|
623 | | - SendDlgItemMessage(hWnd,IDC_VIDMODE,CB_ADDSTRING,6,(LPARAM)buffer);
|
| 687 | + SendDlgItemMessage(hTabs[0], IDC_VIDMODE, CB_ADDSTRING, 6, (LPARAM)buffer);
|
624 | 688 | _tcscpy(buffer,_T("Crop to screen (experimental)"));
|
625 | | - SendDlgItemMessage(hWnd,IDC_VIDMODE,CB_ADDSTRING,7,(LPARAM)buffer);
|
626 | | - SendDlgItemMessage(hWnd,IDC_VIDMODE,CB_SETCURSEL,cfg->scaler,0);
|
| 689 | + SendDlgItemMessage(hTabs[0],IDC_VIDMODE,CB_ADDSTRING,7,(LPARAM)buffer);
|
| 690 | + SendDlgItemMessage(hTabs[0],IDC_VIDMODE,CB_SETCURSEL,cfg->scaler,0);
|
627 | 691 | // colormode
|
628 | | - if(cfg->colormode) SendDlgItemMessage(hWnd,IDC_COLOR,BM_SETCHECK,BST_CHECKED,0);
|
629 | | - else SendDlgItemMessage(hWnd,IDC_COLOR,BM_SETCHECK,BST_UNCHECKED,0);
|
| 692 | + if (cfg->colormode) SendDlgItemMessage(hTabs[0], IDC_COLOR, BM_SETCHECK, BST_CHECKED, 0);
|
| 693 | + else SendDlgItemMessage(hTabs[0], IDC_COLOR, BM_SETCHECK, BST_UNCHECKED, 0);
|
630 | 694 | // scalingfilter
|
631 | 695 | _tcscpy(buffer,_T("Nearest"));
|
632 | | - SendDlgItemMessage(hWnd,IDC_SCALE,CB_ADDSTRING,0,(LPARAM)buffer);
|
| 696 | + SendDlgItemMessage(hTabs[0], IDC_SCALE, CB_ADDSTRING, 0, (LPARAM)buffer);
|
633 | 697 | _tcscpy(buffer,_T("Bilinear"));
|
634 | | - SendDlgItemMessage(hWnd,IDC_SCALE,CB_ADDSTRING,1,(LPARAM)buffer);
|
635 | | - SendDlgItemMessage(hWnd,IDC_SCALE,CB_SETCURSEL,cfg->scalingfilter,0);
|
| 698 | + SendDlgItemMessage(hTabs[0],IDC_SCALE,CB_ADDSTRING,1,(LPARAM)buffer);
|
| 699 | + SendDlgItemMessage(hTabs[0],IDC_SCALE,CB_SETCURSEL,cfg->scalingfilter,0);
|
636 | 700 | // aspect
|
637 | 701 | _tcscpy(buffer,_T("Default"));
|
638 | | - SendDlgItemMessage(hWnd,IDC_ASPECT,CB_ADDSTRING,0,(LPARAM)buffer);
|
| 702 | + SendDlgItemMessage(hTabs[0], IDC_ASPECT, CB_ADDSTRING, 0, (LPARAM)buffer);
|
639 | 703 | _tcscpy(buffer,_T("4:3"));
|
640 | | - SendDlgItemMessage(hWnd,IDC_ASPECT,CB_ADDSTRING,0,(LPARAM)buffer);
|
| 704 | + SendDlgItemMessage(hTabs[0], IDC_ASPECT, CB_ADDSTRING, 0, (LPARAM)buffer);
|
641 | 705 | _tcscpy(buffer,_T("16:10"));
|
642 | | - SendDlgItemMessage(hWnd,IDC_ASPECT,CB_ADDSTRING,0,(LPARAM)buffer);
|
| 706 | + SendDlgItemMessage(hTabs[0], IDC_ASPECT, CB_ADDSTRING, 0, (LPARAM)buffer);
|
643 | 707 | _tcscpy(buffer,_T("16:9"));
|
644 | | - SendDlgItemMessage(hWnd,IDC_ASPECT,CB_ADDSTRING,0,(LPARAM)buffer);
|
| 708 | + SendDlgItemMessage(hTabs[0], IDC_ASPECT, CB_ADDSTRING, 0, (LPARAM)buffer);
|
645 | 709 | _tcscpy(buffer,_T("5:4"));
|
646 | | - SendDlgItemMessage(hWnd,IDC_ASPECT,CB_ADDSTRING,0,(LPARAM)buffer);
|
647 | | - SetAspectCombo(hWnd, IDC_ASPECT, cfg->aspect, cfgmask->aspect, tristate);
|
648 | | -
|
649 | | - // highres
|
650 | | - if(cfg->highres) SendDlgItemMessage(hWnd,IDC_HIGHRES,BM_SETCHECK,BST_CHECKED,0);
|
651 | | - else SendDlgItemMessage(hWnd,IDC_HIGHRES,BM_SETCHECK,BST_UNCHECKED,0);
|
| 710 | + SendDlgItemMessage(hTabs[0], IDC_ASPECT, CB_ADDSTRING, 0, (LPARAM)buffer);
|
| 711 | + SetAspectCombo(hTabs[0], IDC_ASPECT, cfg->aspect, cfgmask->aspect, tristate);
|
| 712 | + // primaryscale
|
| 713 | + _tcscpy(buffer, _T("Auto (Window Size)"));
|
| 714 | + SendDlgItemMessage(hTabs[2], IDC_PRIMARYSCALE, CB_ADDSTRING, 0, (LPARAM)buffer);
|
| 715 | + _tcscpy(buffer, _T("Auto (Multiple of Native)"));
|
| 716 | + SendDlgItemMessage(hTabs[2], IDC_PRIMARYSCALE, CB_ADDSTRING, 1, (LPARAM)buffer);
|
| 717 | + _tcscpy(buffer, _T("1x Native (Recommended)"));
|
| 718 | + SendDlgItemMessage(hTabs[2], IDC_PRIMARYSCALE, CB_ADDSTRING, 2, (LPARAM)buffer);
|
| 719 | + _tcscpy(buffer, _T("1.5x Native"));
|
| 720 | + SendDlgItemMessage(hTabs[2], IDC_PRIMARYSCALE, CB_ADDSTRING, 3, (LPARAM)buffer);
|
| 721 | + _tcscpy(buffer, _T("2x Native"));
|
| 722 | + SendDlgItemMessage(hTabs[2], IDC_PRIMARYSCALE, CB_ADDSTRING, 4, (LPARAM)buffer);
|
| 723 | + _tcscpy(buffer, _T("2.5x Native"));
|
| 724 | + SendDlgItemMessage(hTabs[2], IDC_PRIMARYSCALE, CB_ADDSTRING, 5, (LPARAM)buffer);
|
| 725 | + _tcscpy(buffer, _T("3x Native"));
|
| 726 | + SendDlgItemMessage(hTabs[2], IDC_PRIMARYSCALE, CB_ADDSTRING, 6, (LPARAM)buffer);
|
| 727 | + _tcscpy(buffer, _T("4x Native"));
|
| 728 | + SendDlgItemMessage(hTabs[2], IDC_PRIMARYSCALE, CB_ADDSTRING, 7, (LPARAM)buffer);
|
| 729 | + _tcscpy(buffer, _T("Custom"));
|
| 730 | + SendDlgItemMessage(hTabs[2], IDC_PRIMARYSCALE, CB_ADDSTRING, 8, (LPARAM)buffer);
|
| 731 | + SetPrimaryScaleCombo(hTabs[2], IDC_PRIMARYSCALE, cfg->primaryscale, cfgmask->primaryscale, tristate);
|
652 | 732 | // texfilter
|
653 | 733 | _tcscpy(buffer,_T("Application default"));
|
654 | | - SendDlgItemMessage(hWnd,IDC_TEXFILTER,CB_ADDSTRING,0,(LPARAM)buffer);
|
| 734 | + SendDlgItemMessage(hTabs[1], IDC_TEXFILTER, CB_ADDSTRING, 0, (LPARAM)buffer);
|
655 | 735 | _tcscpy(buffer,_T("Nearest"));
|
656 | | - SendDlgItemMessage(hWnd,IDC_TEXFILTER,CB_ADDSTRING,1,(LPARAM)buffer);
|
| 736 | + SendDlgItemMessage(hTabs[1], IDC_TEXFILTER, CB_ADDSTRING, 1, (LPARAM)buffer);
|
657 | 737 | _tcscpy(buffer,_T("Bilinear"));
|
658 | | - SendDlgItemMessage(hWnd,IDC_TEXFILTER,CB_ADDSTRING,2,(LPARAM)buffer);
|
| 738 | + SendDlgItemMessage(hTabs[1], IDC_TEXFILTER, CB_ADDSTRING, 2, (LPARAM)buffer);
|
659 | 739 | _tcscpy(buffer,_T("Nearest, nearest mipmap"));
|
660 | | - SendDlgItemMessage(hWnd,IDC_TEXFILTER,CB_ADDSTRING,3,(LPARAM)buffer);
|
| 740 | + SendDlgItemMessage(hTabs[1], IDC_TEXFILTER, CB_ADDSTRING, 3, (LPARAM)buffer);
|
661 | 741 | _tcscpy(buffer,_T("Nearest, linear mipmap"));
|
662 | | - SendDlgItemMessage(hWnd,IDC_TEXFILTER,CB_ADDSTRING,4,(LPARAM)buffer);
|
| 742 | + SendDlgItemMessage(hTabs[1], IDC_TEXFILTER, CB_ADDSTRING, 4, (LPARAM)buffer);
|
663 | 743 | _tcscpy(buffer,_T("Bilinear, nearest mipmap"));
|
664 | | - SendDlgItemMessage(hWnd,IDC_TEXFILTER,CB_ADDSTRING,5,(LPARAM)buffer);
|
| 744 | + SendDlgItemMessage(hTabs[1], IDC_TEXFILTER, CB_ADDSTRING, 5, (LPARAM)buffer);
|
665 | 745 | _tcscpy(buffer,_T("Bilinear, linear mipmap"));
|
666 | | - SendDlgItemMessage(hWnd,IDC_TEXFILTER,CB_ADDSTRING,6,(LPARAM)buffer);
|
667 | | - SendDlgItemMessage(hWnd,IDC_TEXFILTER,CB_SETCURSEL,cfg->texfilter,0);
|
| 746 | + SendDlgItemMessage(hTabs[1],IDC_TEXFILTER,CB_ADDSTRING,6,(LPARAM)buffer);
|
| 747 | + SendDlgItemMessage(hTabs[1],IDC_TEXFILTER,CB_SETCURSEL,cfg->texfilter,0);
|
668 | 748 | // anisotropic
|
669 | 749 | if (anisotropic < 2)
|
670 | 750 | {
|
671 | 751 | _tcscpy(buffer,_T("Not supported"));
|
672 | | - SendDlgItemMessage(hWnd,IDC_ANISO,CB_ADDSTRING,0,(LPARAM)buffer);
|
673 | | - SendDlgItemMessage(hWnd,IDC_ANISO,CB_SETCURSEL,0,0);
|
674 | | - EnableWindow(GetDlgItem(hWnd,IDC_ANISO),FALSE);
|
| 752 | + SendDlgItemMessage(hTabs[1], IDC_ANISO, CB_ADDSTRING, 0, (LPARAM)buffer);
|
| 753 | + SendDlgItemMessage(hTabs[1], IDC_ANISO, CB_SETCURSEL, 0, 0);
|
| 754 | + EnableWindow(GetDlgItem(hTabs[1], IDC_ANISO), FALSE);
|
675 | 755 | cfg->anisotropic = 0;
|
676 | 756 | }
|
677 | 757 | else
|
678 | 758 | {
|
679 | 759 | _tcscpy(buffer,_T("Application default"));
|
680 | | - SendDlgItemMessage(hWnd,IDC_ANISO,CB_ADDSTRING,0,(LPARAM)buffer);
|
| 760 | + SendDlgItemMessage(hTabs[1], IDC_ANISO, CB_ADDSTRING, 0, (LPARAM)buffer);
|
681 | 761 | _tcscpy(buffer,_T("Disabled"));
|
682 | | - SendDlgItemMessage(hWnd,IDC_ANISO,CB_ADDSTRING,1,(LPARAM)buffer);
|
| 762 | + SendDlgItemMessage(hTabs[1], IDC_ANISO, CB_ADDSTRING, 1, (LPARAM)buffer);
|
683 | 763 | if(anisotropic >= 2)
|
684 | 764 | {
|
685 | 765 | _tcscpy(buffer,_T("2x"));
|
686 | | - SendDlgItemMessage(hWnd,IDC_ANISO,CB_ADDSTRING,2,(LPARAM)buffer);
|
| 766 | + SendDlgItemMessage(hTabs[1], IDC_ANISO, CB_ADDSTRING, 2, (LPARAM)buffer);
|
687 | 767 | }
|
688 | 768 | if(anisotropic >= 4)
|
689 | 769 | {
|
690 | 770 | _tcscpy(buffer,_T("4x"));
|
691 | | - SendDlgItemMessage(hWnd,IDC_ANISO,CB_ADDSTRING,4,(LPARAM)buffer);
|
| 771 | + SendDlgItemMessage(hTabs[1], IDC_ANISO, CB_ADDSTRING, 4, (LPARAM)buffer);
|
692 | 772 | }
|
693 | 773 | if(anisotropic >= 8)
|
694 | 774 | {
|
695 | 775 | _tcscpy(buffer,_T("8x"));
|
696 | | - SendDlgItemMessage(hWnd,IDC_ANISO,CB_ADDSTRING,8,(LPARAM)buffer);
|
| 776 | + SendDlgItemMessage(hTabs[1], IDC_ANISO, CB_ADDSTRING, 8, (LPARAM)buffer);
|
697 | 777 | }
|
698 | 778 | if(anisotropic >= 16)
|
699 | 779 | {
|
700 | 780 | _tcscpy(buffer,_T("16x"));
|
701 | | - SendDlgItemMessage(hWnd,IDC_ANISO,CB_ADDSTRING,16,(LPARAM)buffer);
|
| 781 | + SendDlgItemMessage(hTabs[1], IDC_ANISO, CB_ADDSTRING, 16, (LPARAM)buffer);
|
702 | 782 | }
|
703 | 783 | if(anisotropic >= 32)
|
704 | 784 | {
|
705 | 785 | _tcscpy(buffer,_T("32x"));
|
706 | | - SendDlgItemMessage(hWnd,IDC_ANISO,CB_ADDSTRING,4,(LPARAM)buffer);
|
| 786 | + SendDlgItemMessage(hTabs[1], IDC_ANISO, CB_ADDSTRING, 4, (LPARAM)buffer);
|
707 | 787 | }
|
708 | | - SendDlgItemMessage(hWnd,IDC_ANISO,CB_SETCURSEL,cfg->anisotropic,0);
|
| 788 | + SendDlgItemMessage(hTabs[1], IDC_ANISO, CB_SETCURSEL, cfg->anisotropic, 0);
|
709 | 789 | }
|
710 | 790 | // msaa
|
711 | 791 | if(msaa)
|
712 | 792 | {
|
713 | 793 | _tcscpy(buffer,_T("Application default"));
|
714 | | - SendDlgItemMessage(hWnd,IDC_MSAA,CB_ADDSTRING,0,(LPARAM)buffer);
|
| 794 | + SendDlgItemMessage(hTabs[1], IDC_MSAA, CB_ADDSTRING, 0, (LPARAM)buffer);
|
715 | 795 | _tcscpy(buffer,_T("Disabled"));
|
716 | | - SendDlgItemMessage(hWnd,IDC_MSAA,CB_ADDSTRING,1,(LPARAM)buffer);
|
| 796 | + SendDlgItemMessage(hTabs[1], IDC_MSAA, CB_ADDSTRING, 1, (LPARAM)buffer);
|
717 | 797 | if(maxcoverage)
|
718 | 798 | {
|
719 | 799 | for(i = 0; i < maxcoverage; i++)
|
— | — | @@ -720,7 +800,7 @@ |
721 | 801 | if((msaamodes[i] & 0xfff) <= 4)
|
722 | 802 | _sntprintf(buffer,64,_T("%dx"),msaamodes[i] & 0xfff);
|
723 | 803 | else _sntprintf(buffer,64,_T("%dx coverage, %dx color"),(msaamodes[i] & 0xfff), (msaamodes[i] >> 12));
|
724 | | - SendDlgItemMessage(hWnd,IDC_MSAA,CB_ADDSTRING,msaamodes[i],(LPARAM)buffer);
|
| 804 | + SendDlgItemMessage(hTabs[1], IDC_MSAA, CB_ADDSTRING, msaamodes[i], (LPARAM)buffer);
|
725 | 805 | }
|
726 | 806 | }
|
727 | 807 | else
|
— | — | @@ -728,59 +808,63 @@ |
729 | 809 | if(maxsamples >= 2)
|
730 | 810 | {
|
731 | 811 | _tcscpy(buffer,_T("2x"));
|
732 | | - SendDlgItemMessage(hWnd,IDC_MSAA,CB_ADDSTRING,2,(LPARAM)buffer);
|
| 812 | + SendDlgItemMessage(hTabs[1], IDC_MSAA, CB_ADDSTRING, 2, (LPARAM)buffer);
|
733 | 813 | }
|
734 | 814 | if(maxsamples >= 4)
|
735 | 815 | {
|
736 | 816 | _tcscpy(buffer,_T("4x"));
|
737 | | - SendDlgItemMessage(hWnd,IDC_MSAA,CB_ADDSTRING,4,(LPARAM)buffer);
|
| 817 | + SendDlgItemMessage(hTabs[1], IDC_MSAA, CB_ADDSTRING, 4, (LPARAM)buffer);
|
738 | 818 | }
|
739 | 819 | if(maxsamples >= 8)
|
740 | 820 | {
|
741 | 821 | _tcscpy(buffer,_T("8x"));
|
742 | | - SendDlgItemMessage(hWnd,IDC_MSAA,CB_ADDSTRING,8,(LPARAM)buffer);
|
| 822 | + SendDlgItemMessage(hTabs[1], IDC_MSAA, CB_ADDSTRING, 8, (LPARAM)buffer);
|
743 | 823 | }
|
744 | 824 | if(maxsamples >= 16)
|
745 | 825 | {
|
746 | 826 | _tcscpy(buffer,_T("16x"));
|
747 | | - SendDlgItemMessage(hWnd,IDC_MSAA,CB_ADDSTRING,16,(LPARAM)buffer);
|
| 827 | + SendDlgItemMessage(hTabs[1], IDC_MSAA, CB_ADDSTRING, 16, (LPARAM)buffer);
|
748 | 828 | }
|
749 | 829 | if(maxsamples >= 32)
|
750 | 830 | {
|
751 | 831 | _tcscpy(buffer,_T("32x"));
|
752 | | - SendDlgItemMessage(hWnd,IDC_MSAA,CB_ADDSTRING,32,(LPARAM)buffer);
|
| 832 | + SendDlgItemMessage(hTabs[1], IDC_MSAA, CB_ADDSTRING, 32, (LPARAM)buffer);
|
753 | 833 | }
|
754 | 834 | }
|
755 | | - SendDlgItemMessage(hWnd,IDC_MSAA,CB_SETCURSEL,cfg->msaa,0);
|
| 835 | + SendDlgItemMessage(hTabs[1], IDC_MSAA, CB_SETCURSEL, cfg->msaa, 0);
|
756 | 836 | }
|
757 | 837 | else
|
758 | 838 | {
|
759 | 839 | _tcscpy(buffer,_T("Not supported"));
|
760 | | - SendDlgItemMessage(hWnd,IDC_MSAA,CB_ADDSTRING,0,(LPARAM)buffer);
|
761 | | - SendDlgItemMessage(hWnd,IDC_MSAA,CB_SETCURSEL,0,0);
|
762 | | - EnableWindow(GetDlgItem(hWnd,IDC_MSAA),FALSE);
|
| 840 | + SendDlgItemMessage(hTabs[1], IDC_MSAA, CB_ADDSTRING, 0, (LPARAM)buffer);
|
| 841 | + SendDlgItemMessage(hTabs[1], IDC_MSAA, CB_SETCURSEL, 0, 0);
|
| 842 | + EnableWindow(GetDlgItem(hTabs[1], IDC_MSAA), FALSE);
|
763 | 843 | cfg->msaa = 0;
|
764 | 844 | }
|
765 | 845 | // aspect3d
|
766 | 846 | _tcscpy(buffer,_T("Stretch to display"));
|
767 | | - SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_ADDSTRING,0,(LPARAM)buffer);
|
| 847 | + SendDlgItemMessage(hTabs[1], IDC_ASPECT3D, CB_ADDSTRING, 0, (LPARAM)buffer);
|
768 | 848 | _tcscpy(buffer,_T("Expand viewable area"));
|
769 | | - SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_ADDSTRING,1,(LPARAM)buffer);
|
| 849 | + SendDlgItemMessage(hTabs[1], IDC_ASPECT3D, CB_ADDSTRING, 1, (LPARAM)buffer);
|
770 | 850 | _tcscpy(buffer,_T("Crop to display"));
|
771 | | - SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_ADDSTRING,2,(LPARAM)buffer);
|
772 | | - SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_SETCURSEL,cfg->aspect3d,0);
|
| 851 | + SendDlgItemMessage(hTabs[1],IDC_ASPECT3D,CB_ADDSTRING,2,(LPARAM)buffer);
|
| 852 | + SendDlgItemMessage(hTabs[1],IDC_ASPECT3D,CB_SETCURSEL,cfg->aspect3d,0);
|
773 | 853 | // sort modes
|
774 | 854 | _tcscpy(buffer,_T("Use system order"));
|
775 | | - SendDlgItemMessage(hWnd,IDC_SORTMODES,CB_ADDSTRING,0,(LPARAM)buffer);
|
| 855 | + SendDlgItemMessage(hTabs[0], IDC_SORTMODES, CB_ADDSTRING, 0, (LPARAM)buffer);
|
776 | 856 | _tcscpy(buffer,_T("Group by color depth"));
|
777 | | - SendDlgItemMessage(hWnd,IDC_SORTMODES,CB_ADDSTRING,1,(LPARAM)buffer);
|
| 857 | + SendDlgItemMessage(hTabs[0], IDC_SORTMODES, CB_ADDSTRING, 1, (LPARAM)buffer);
|
778 | 858 | _tcscpy(buffer,_T("Group by resolution"));
|
779 | | - SendDlgItemMessage(hWnd,IDC_SORTMODES,CB_ADDSTRING,2,(LPARAM)buffer);
|
780 | | - SendDlgItemMessage(hWnd,IDC_SORTMODES,CB_SETCURSEL,cfg->SortModes,0);
|
| 859 | + SendDlgItemMessage(hTabs[0],IDC_SORTMODES,CB_ADDSTRING,2,(LPARAM)buffer);
|
| 860 | + SendDlgItemMessage(hTabs[0],IDC_SORTMODES,CB_SETCURSEL,cfg->SortModes,0);
|
781 | 861 | // color depths
|
782 | | - if(cfg->AllColorDepths) SendDlgItemMessage(hWnd,IDC_UNCOMMONCOLOR,BM_SETCHECK,BST_CHECKED,0);
|
783 | | - else SendDlgItemMessage(hWnd,IDC_UNCOMMONCOLOR,BM_SETCHECK,BST_UNCHECKED,0);
|
784 | | - // extra modes
|
| 862 | + for (i = 0; i < 32; i++)
|
| 863 | + {
|
| 864 | + _tcscpy(buffer, colormodes[i]);
|
| 865 | + SendDlgItemMessage(hTabs[0], IDC_COLORDEPTH, CB_ADDSTRING, i, (LPARAM)buffer);
|
| 866 | + }
|
| 867 | + SendDlgItemMessage(hTabs[0], IDC_COLORDEPTH, CB_SETCURSEL, cfg->AddColorDepths, 0);
|
| 868 | + /*// extra modes
|
785 | 869 | if(cfg->ExtraModes) SendDlgItemMessage(hWnd,IDC_EXTRAMODES,BM_SETCHECK,BST_CHECKED,0);
|
786 | 870 | else SendDlgItemMessage(hWnd,IDC_EXTRAMODES,BM_SETCHECK,BST_UNCHECKED,0);
|
787 | 871 | // shader path
|
— | — | @@ -944,7 +1028,7 @@ |
945 | 1029 | }
|
946 | 1030 | else
|
947 | 1031 | {
|
948 | | - //EnableWindow(GetDlgItem(hWnd, IDC_DPISCALE), FALSE);
|
| 1032 | + EnableWindow(GetDlgItem(hTabs[0], IDC_DPISCALE), FALSE);
|
949 | 1033 | }
|
950 | 1034 | if(token) CloseHandle(token);
|
951 | 1035 | return TRUE;
|
— | — | @@ -1383,6 +1467,7 @@ |
1384 | 1468 |
|
1385 | 1469 | int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
|
1386 | 1470 | {
|
| 1471 | + WNDCLASSEX wc;
|
1387 | 1472 | INITCOMMONCONTROLSEX icc;
|
1388 | 1473 | HMODULE comctl32;
|
1389 | 1474 | BOOL(WINAPI *iccex)(LPINITCOMMONCONTROLSEX lpInitCtrls);
|
— | — | @@ -1403,6 +1488,12 @@ |
1404 | 1489 | iccex = (BOOL (WINAPI *)(LPINITCOMMONCONTROLSEX))GetProcAddress(comctl32,"InitCommonControlsEx");
|
1405 | 1490 | if(iccex) iccex(&icc);
|
1406 | 1491 | else InitCommonControls();
|
| 1492 | + ZeroMemory(&wc, sizeof(WNDCLASSEX));
|
| 1493 | + wc.cbSize = sizeof(WNDCLASSEX);
|
| 1494 | + wc.lpfnWndProc = CheckedComboProc;
|
| 1495 | + wc.hInstance = hInstance;
|
| 1496 | + wc.lpszClassName = _T("CheckedComboBox");
|
| 1497 | + RegisterClassEx(&wc);
|
1407 | 1498 | hinstance = hInstance;
|
1408 | 1499 | GetModuleFileName(NULL,hlppath,MAX_PATH);
|
1409 | 1500 | GetDirFromPath(hlppath);
|
Index: dxglcfg2/dxglcfg2.rc |
— | — | @@ -15,9 +15,11 @@ |
16 | 16 | // License along with this library; if not, write to the Free Software
|
17 | 17 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18 | 18 |
|
| 19 | +#define APSTUDIO_HIDDEN_SYMBOLS
|
19 | 20 | #include <windows.h>
|
20 | 21 | #include <commctrl.h>
|
21 | 22 | #include <richedit.h>
|
| 23 | +#undef APSTUDIO_HIDDEN_SYMBOLS
|
22 | 24 | #include "resource.h"
|
23 | 25 | #include "../common/version.h"
|
24 | 26 |
|
— | — | @@ -37,7 +39,7 @@ |
38 | 40 | COMBOBOX IDC_EXTRAMODES, 114, 42, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
|
39 | 41 | LTEXT "Additional display modes", 0, 114, 32, 78, 8, SS_LEFT, WS_EX_LEFT
|
40 | 42 | COMBOBOX IDC_COLORDEPTH, 114, 17, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
|
41 | | - LTEXT "Add color depths", 0, 114, 7, 54, 8, SS_LEFT, WS_EX_LEFT
|
| 43 | + LTEXT "Add color depths", IDC_STATIC, 114, 7, 54, 8, SS_LEFT, WS_EX_LEFT
|
42 | 44 | LTEXT "DPI scaling mode", IDC_STATIC, 7, 82, 55, 8, SS_LEFT, WS_EX_LEFT
|
43 | 45 | COMBOBOX IDC_DPISCALE, 7, 92, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
|
44 | 46 | LTEXT "Screen aspect ratio", IDC_STATIC, 7, 57, 63, 8, SS_LEFT, WS_EX_LEFT
|
— | — | @@ -92,7 +94,7 @@ |
93 | 95 | EDITTEXT IDC_CUSTOMSCALEX, 15, 69, 40, 14, WS_DISABLED | ES_AUTOHSCROLL, WS_EX_LEFT
|
94 | 96 | LTEXT "X", IDC_CUSTOMSCALELABELX, 7, 72, 6, 8, WS_DISABLED | SS_LEFT, WS_EX_LEFT
|
95 | 97 | EDITTEXT IDC_CUSTOMSCALEY, 65, 69, 40, 14, WS_DISABLED | ES_AUTOHSCROLL, WS_EX_LEFT
|
96 | | - AUTOCHECKBOX "Use post-processing shader", 0, 7, 8, 103, 8, 0, WS_EX_LEFT
|
| 98 | + AUTOCHECKBOX "Use post-processing shader", IDC_USESHADER, 7, 8, 103, 8, 0, WS_EX_LEFT
|
97 | 99 | COMBOBOX IDC_SHADER, 7, 18, 247, 92, WS_DISABLED | CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT
|
98 | 100 | PUSHBUTTON "...", IDC_BROWSESHADER, 256, 17, 20, 14, WS_DISABLED, WS_EX_LEFT
|
99 | 101 | }
|
— | — | @@ -138,7 +140,7 @@ |
139 | 141 | FONT 8, "Ms Shell Dlg"
|
140 | 142 | {
|
141 | 143 | LTEXT "Loading profiles...", 0, 95, 10, 56, 8, SS_LEFT, WS_EX_LEFT
|
142 | | - CONTROL "", 0, PROGRESS_CLASS, 0, 7, 20, 232, 14, WS_EX_LEFT
|
| 144 | + CONTROL "", IDC_PROGRESS, PROGRESS_CLASS, 0, 7, 20, 232, 14, WS_EX_LEFT
|
143 | 145 | }
|
144 | 146 |
|
145 | 147 |
|
Index: dxglcfg2/resource.h |
— | — | @@ -59,3 +59,5 @@ |
60 | 60 | #define IDC_CUSTOMSCALEY 1027
|
61 | 61 | #define IDC_VSYNC 1028
|
62 | 62 | #define IDC_COLOR 1029
|
| 63 | +#define IDC_USESHADER 1030
|
| 64 | +#define IDC_PROGRESS 1031
|