gsdx:windows: Redo main dialog

This moves the hardware, non-renderer dependent options to the top and
makes the renderer options visible only when it affects the current
renderer.

The texture filtering checkbox has been changed to a combobox and now
uses the same description as Linux does.

Also changes the Title to GSdx Settings.
This commit is contained in:
Jonathan Li 2015-08-09 09:56:05 +01:00
parent e6b9805167
commit fcc8a941b0
3 changed files with 86 additions and 64 deletions

View File

@ -147,15 +147,14 @@ void GSSettingsDlg::OnInit()
ComboBoxInit(IDC_OPENCL_DEVICE, m_ocl_devs, ocl_sel);
UpdateRenderers();
ComboBoxInit(IDC_INTERLACE, theApp.m_gs_interlace, theApp.GetConfig("Interlace", 7)); // 7 = "auto", detects interlace based on SMODE2 register
ComboBoxInit(IDC_UPSCALE_MULTIPLIER, theApp.m_gs_upscale_multiplier, theApp.GetConfig("upscale_multiplier", 1));
ComboBoxInit(IDC_AFCOMBO, theApp.m_gs_max_anisotropy, theApp.GetConfig("MaxAnisotropy", 0));
ComboBoxInit(IDC_FILTER, theApp.m_gs_filter, theApp.GetConfig("filter", 2));
ComboBoxInit(IDC_ACCURATE_BLEND_UNIT, theApp.m_gs_acc_blend_level, theApp.GetConfig("accurate_blending_unit", 1));
ComboBoxInit(IDC_CRC_LEVEL, theApp.m_gs_crc_level, theApp.GetConfig("crc_hack_level", 3));
CheckDlgButton(m_hWnd, IDC_FILTER, theApp.GetConfig("filter", 2));
CheckDlgButton(m_hWnd, IDC_PALTEX, theApp.GetConfig("paltex", 0));
CheckDlgButton(m_hWnd, IDC_LOGZ, theApp.GetConfig("logz", 1));
CheckDlgButton(m_hWnd, IDC_FBA, theApp.GetConfig("fba", 1));
@ -163,8 +162,7 @@ void GSSettingsDlg::OnInit()
CheckDlgButton(m_hWnd, IDC_NATIVERES, theApp.GetConfig("nativeres", 1));
CheckDlgButton(m_hWnd, IDC_ACCURATE_DATE, theApp.GetConfig("accurate_date", 0));
CheckDlgButton(m_hWnd, IDC_TC_DEPTH, theApp.GetConfig("texture_cache_depth", 0));
// Shade Boost
CheckDlgButton(m_hWnd, IDC_SHADEBOOST, theApp.GetConfig("ShadeBoost", 0));
@ -176,7 +174,6 @@ void GSSettingsDlg::OnInit()
// Hacks
CheckDlgButton(m_hWnd, IDC_HACKS_ENABLED, theApp.GetConfig("UserHacks", 0));
SendMessage(GetDlgItem(m_hWnd, IDC_RESX), UDM_SETRANGE, 0, MAKELPARAM(8192, 256));
SendMessage(GetDlgItem(m_hWnd, IDC_RESX), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("resx", 1024), 0));
@ -184,7 +181,6 @@ void GSSettingsDlg::OnInit()
SendMessage(GetDlgItem(m_hWnd, IDC_RESY), UDM_SETRANGE, 0, MAKELPARAM(8192, 256));
SendMessage(GetDlgItem(m_hWnd, IDC_RESY), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("resy", 1024), 0));
SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_SETRANGE, 0, MAKELPARAM(16, 0));
SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("extrathreads", 0), 0));
@ -211,12 +207,12 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
break;
case IDC_RENDERER:
case IDC_UPSCALE_MULTIPLIER:
case IDC_FILTER:
if (code == CBN_SELCHANGE)
UpdateControls();
break;
case IDC_NATIVERES:
case IDC_SHADEBOOST:
case IDC_FILTER:
case IDC_PALTEX:
case IDC_HACKS_ENABLED:
if (code == BN_CLICKED)
@ -264,7 +260,12 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
{
theApp.SetConfig("upscale_multiplier", 1);
}
if (ComboBoxGetSelData(IDC_FILTER, data))
{
theApp.SetConfig("filter", (int)data);
}
if(ComboBoxGetSelData(IDC_ACCURATE_BLEND_UNIT, data))
{
theApp.SetConfig("accurate_blending_unit", (int)data);
@ -280,7 +281,6 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
theApp.SetConfig("MaxAnisotropy", (int)data);
}
theApp.SetConfig("filter", (int)IsDlgButtonChecked(m_hWnd, IDC_FILTER));
theApp.SetConfig("paltex", (int)IsDlgButtonChecked(m_hWnd, IDC_PALTEX));
theApp.SetConfig("logz", (int)IsDlgButtonChecked(m_hWnd, IDC_LOGZ));
theApp.SetConfig("fba", (int)IsDlgButtonChecked(m_hWnd, IDC_FBA));
@ -291,10 +291,7 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
theApp.SetConfig("extrathreads", (int)SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_GETPOS, 0, 0));
theApp.SetConfig("accurate_date", (int)IsDlgButtonChecked(m_hWnd, IDC_ACCURATE_DATE));
theApp.SetConfig("texture_cache_depth", (int)IsDlgButtonChecked(m_hWnd, IDC_TC_DEPTH));
// Shade Boost
theApp.SetConfig("ShadeBoost", (int)IsDlgButtonChecked(m_hWnd, IDC_SHADEBOOST));
@ -380,8 +377,18 @@ void GSSettingsDlg::UpdateControls()
ShowWindow(GetDlgItem(m_hWnd, IDC_LOGO9), dx9 ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(m_hWnd, IDC_LOGO11), dx11 ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(m_hWnd, IDC_LOGOGL), ogl ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(m_hWnd, IDC_LOGZ), dx9? SW_SHOW: SW_HIDE);
ShowWindow(GetDlgItem(m_hWnd, IDC_FBA), dx9 ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_DATE), ogl ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_BLEND_UNIT), ogl ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_BLEND_UNIT_TEXT), ogl ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(m_hWnd, IDC_TC_DEPTH), ogl ? SW_SHOW : SW_HIDE);
EnableWindow(GetDlgItem(m_hWnd, IDC_CRC_LEVEL), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_CRC_LEVEL_TEXT), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_OPENCL_DEVICE), ocl);
EnableWindow(GetDlgItem(m_hWnd, IDC_WINDOWED), dx9);
EnableWindow(GetDlgItem(m_hWnd, IDC_RESX), hw && !native && scaling == 1);
EnableWindow(GetDlgItem(m_hWnd, IDC_RESX_EDIT), hw && !native && scaling == 1);
EnableWindow(GetDlgItem(m_hWnd, IDC_RESY), hw && !native && scaling == 1);
@ -392,9 +399,17 @@ void GSSettingsDlg::UpdateControls()
EnableWindow(GetDlgItem(m_hWnd, IDC_PALTEX), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_LOGZ), dx9 && hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_FBA), dx9 && hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_AFCOMBO), hw && (int)IsDlgButtonChecked(m_hWnd, IDC_FILTER) && !(int)IsDlgButtonChecked(m_hWnd, IDC_PALTEX));
INT_PTR filter;
if (ComboBoxGetSelData(IDC_FILTER, filter))
{
EnableWindow(GetDlgItem(m_hWnd, IDC_AFCOMBO), hw && filter && !IsDlgButtonChecked(m_hWnd, IDC_PALTEX));
}
EnableWindow(GetDlgItem(m_hWnd, IDC_AFCOMBO_TEXT), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_FILTER_TEXT), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_DATE), ogl && hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_BLEND_UNIT), ogl && hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_BLEND_UNIT_TEXT), ogl && hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_TC_DEPTH), ogl && hw);

View File

@ -182,58 +182,59 @@ BEGIN
CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,157,49,10
END
IDD_CONFIG DIALOGEX 0, 0, 187, 406
IDD_CONFIG DIALOGEX 0, 0, 185, 391
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Settings..."
CAPTION "GSdx Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL IDB_LOGO10,IDC_LOGO11,"Static",SS_BITMAP | SS_CENTERIMAGE,6,6,173,42
DEFPUSHBUTTON "OK",IDOK,40,386,50,14
DEFPUSHBUTTON "OK",IDOK,40,371,50,14
LTEXT "Renderer:",IDC_STATIC,6,72,34,8
COMBOBOX IDC_RENDERER,70,70,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_RENDERER,68,70,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Interlacing (F5):",IDC_STATIC,6,101,53,8
COMBOBOX IDC_INTERLACE,70,99,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Custom Resolution:",IDC_STATIC,26,163,65,8
EDITTEXT IDC_RESX_EDIT,92,161,35,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_RESX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,120,161,11,14
EDITTEXT IDC_RESY_EDIT,130,161,35,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_RESY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,154,161,11,14
CONTROL "Native",IDC_NATIVERES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,134,33,10
LTEXT "Extra rendering threads:",IDC_STATIC,11,354,80,8
EDITTEXT IDC_SWTHREADS_EDIT,94,352,35,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,129,344,11,14
COMBOBOX IDC_UPSCALE_MULTIPLIER,92,146,74,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Or use Scaling:",IDC_STATIC,37,148,49,8
LTEXT "Original PS2 Resolution:",IDC_STATIC,10,134,80,8
CONTROL "Edge Anti-aliasing (AA1)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,370,93,10
PUSHBUTTON "Cancel",IDCANCEL,95,386,50,14
CONTROL IDB_LOGO9,IDC_LOGO9,"Static",SS_BITMAP | SS_CENTERIMAGE,6,6,175,44
CONTROL IDB_LOGOGL,IDC_LOGOGL,"Static",SS_BITMAP | SS_CENTERIMAGE,6,6,175,42
GROUPBOX "Internal Resolution (can cause glitches)",IDC_STATIC,6,116,175,64,BS_CENTER
GROUPBOX "Software Mode Settings",IDC_STATIC,6,341,175,43,BS_CENTER
GROUPBOX "Hardware Mode Settings",IDC_STATIC,6,214,175,126,BS_CENTER
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,227,58,10
CONTROL "Alpha Correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,243,87,10
CONTROL "Allow 8-Bit Textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,243,82,10
CONTROL "Texture Filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,10,227,67,10
CONTROL "Enable Shade Boost",IDC_SHADEBOOST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,186,79,10
CONTROL "Accurate Date",IDC_ACCURATE_DATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,275,67,10
PUSHBUTTON "Settings...",IDC_SHADEBUTTON,92,183,75,14
CONTROL "Enable HW Hacks",IDC_HACKS_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,290,71,10
PUSHBUTTON "Configure...",IDC_HACKSBUTTON,91,288,75,14
COMBOBOX IDC_INTERLACE,68,99,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Custom Resolution:",IDC_STATIC,25,159,65,8
EDITTEXT IDC_RESX_EDIT,94,157,39,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_RESX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,120,157,11,14
EDITTEXT IDC_RESY_EDIT,136,157,39,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_RESY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,154,157,11,14
CONTROL "Native",IDC_NATIVERES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,130,33,10
LTEXT "Extra rendering threads:",IDC_STATIC,11,340,83,8
EDITTEXT IDC_SWTHREADS_EDIT,94,337,35,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,130,335,11,14
COMBOBOX IDC_UPSCALE_MULTIPLIER,94,143,81,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Or use Scaling:",IDC_STATIC,35,145,55,8
RTEXT "Original PS2 Resolution:",IDC_STATIC,11,130,79,8
CONTROL "Edge Anti-aliasing (AA1)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,354,93,10
PUSHBUTTON "Cancel",IDCANCEL,95,371,50,14
CONTROL IDB_LOGO9,IDC_LOGO9,"Static",SS_BITMAP | SS_CENTERIMAGE,6,6,173,44
CONTROL IDB_LOGOGL,IDC_LOGOGL,"Static",SS_BITMAP | SS_CENTERIMAGE,6,6,173,42
GROUPBOX "Internal Resolution (can cause glitches)",IDC_STATIC,6,116,173,58,BS_CENTER
GROUPBOX "Software Mode Settings",IDC_STATIC,6,328,173,41,BS_CENTER
GROUPBOX "Hardware Mode Settings",IDC_STATIC,6,208,173,118,BS_CENTER
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,297,58,8
CONTROL "Alpha Correction",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,297,81,8
CONTROL "Allow 8-Bit Textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,219,79,10
CONTROL "Enable Shade Boost",IDC_SHADEBOOST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,178,79,10
CONTROL "Accurate Date",IDC_ACCURATE_DATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,297,67,8
PUSHBUTTON "Settings...",IDC_SHADEBUTTON,94,176,81,14
CONTROL "Enable HW Hacks",IDC_HACKS_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,281,71,10
PUSHBUTTON "Configure Hacks...",IDC_HACKSBUTTON,94,279,81,14
LTEXT "Adapter:",IDC_STATIC,6,57,30,8
COMBOBOX IDC_ADAPTER,70,55,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Enable FXAA",IDC_FXAA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,201,80,10
CONTROL "Enable FX Shader",IDC_SHADER_FX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,201,80,10
LTEXT "Anisotropic Filtering:",IDC_STATIC,10,306,77,8
COMBOBOX IDC_AFCOMBO,92,304,35,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_ADAPTER,68,55,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Enable FXAA",IDC_FXAA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,194,61,10
CONTROL "Enable FX Shader",IDC_SHADER_FX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,194,71,10
RTEXT "Anisotropic Filtering:",IDC_AFCOMBO_TEXT,18,249,72,8
COMBOBOX IDC_AFCOMBO,94,247,81,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "OpenCL Device:",IDC_STATIC,6,86,52,8
COMBOBOX IDC_OPENCL_DEVICE,70,84,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "HW OGL Depth",IDC_TC_DEPTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,273,72,13
COMBOBOX IDC_ACCURATE_BLEND_UNIT,92,257,75,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Blending Unit Accuracy:",IDC_STATIC,11,260,75,10
COMBOBOX IDC_CRC_LEVEL,92,320,75,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "CRC Hack Level:",IDC_STATIC,32,322,54,8
COMBOBOX IDC_OPENCL_DEVICE,68,84,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Hardware Depth",IDC_TC_DEPTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,297,72,8
COMBOBOX IDC_ACCURATE_BLEND_UNIT,94,309,81,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Blending Unit Accuracy:",IDC_ACCURATE_BLEND_UNIT_TEXT,11,311,79,10
COMBOBOX IDC_CRC_LEVEL,94,263,81,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "CRC Hack Level:",IDC_CRC_LEVEL_TEXT,36,265,54,8
COMBOBOX IDC_FILTER,94,231,81,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Texture Filtering:",IDC_FILTER_TEXT,32,233,58,8
END
@ -282,12 +283,15 @@ BEGIN
IDD_CONFIG, DIALOG
BEGIN
LEFTMARGIN, 6
RIGHTMARGIN, 181
RIGHTMARGIN, 179
VERTGUIDE, 11
VERTGUIDE, 86
VERTGUIDE, 90
VERTGUIDE, 94
VERTGUIDE, 175
TOPMARGIN, 6
BOTTOMMARGIN, 400
HORZGUIDE, 285
BOTTOMMARGIN, 385
HORZGUIDE, 194
HORZGUIDE, 297
END
END
#endif // APSTUDIO_INVOKED

View File

@ -11,6 +11,7 @@
#define IDC_RESY_EDIT 2010
#define IDC_AA1 2011
#define IDC_SWTHREADS_EDIT 2012
#define IDC_FILTER_TEXT 2014
#define IDC_FILTER 2015
#define IDC_DITHERING 2016
#define IDC_RESX 2018
@ -39,6 +40,7 @@
#define IDC_WIDTH 2041
#define IDC_HEIGHT 2042
#define IDC_CONFIGURE 2043
#define IDC_ACCURATE_BLEND_UNIT_TEXT 2044
#define IDC_WINDOWED 2046
#define IDC_SKIPDRAWHACKEDIT 2048
#define IDC_SPRITEHACK 2051
@ -69,6 +71,7 @@
#define IDC_TCOFFSETY2 2084
#define IDC_FXAA 2085
#define IDC_SHADER_FX 2086
#define IDC_AFCOMBO_TEXT 2087
#define IDC_AFCOMBO 2088
#define IDC_OPENCL_DEVICE 2089
#define IDC_ACCURATE_BLEND_UNIT 2090
@ -76,7 +79,7 @@
#define IDC_ROUND_SPRITE 2092
#define IDC_ALIGN_SPRITE 2093
#define IDC_CRC_LEVEL 2094
#define IDC_CHECK1 2095
#define IDC_CRC_LEVEL_TEXT 2095
#define IDC_TC_DEPTH 2096
#define IDC_COLORSPACE 3000
#define IDR_CONVERT_FX 10000