GSdx: Add Windows GUI for split texture filtering option

Adds Windows GUI elements of the split texture filtering options.

Bilinear Texture Filtering is moved to the top section of the main GSdx window,
and Trilinear Filtering is moved to Hacks.
This commit is contained in:
FlatOutPS2 2017-03-03 22:12:23 +01:00 committed by Gregory Hainaut
parent cb0a430aa4
commit 117c249595
4 changed files with 60 additions and 51 deletions

View File

@ -37,13 +37,11 @@ const char* dialog_message(int ID, bool* updateText) {
" Rendering is smoother but it could generate a few glitches. If upscaling is enabled, this setting is recommended over 'Bilinear Forced'\n\n"
"Bilinear Forced:\nAlways enable interpolation. Rendering is smoother but it could generate some glitches.\n\n"
"Bilinear PS2:\nUse same mode as the PS2. It is the more accurate option.\n\n";
#ifdef __unix__
case IDC_TRI_FILTER:
return "Control the texture tri-filtering of the emulation.\n\n"
"None:\nNo extra trilinear filtering.\n\n"
"Trilinear:\nUse OpenGL trilinear interpolation when PS2 uses mipmaps.\n\n"
"Trilinear Forced:\nAlways enable full trilinear interpolation. Warning Slow!\n\n";
#endif
case IDC_CRC_LEVEL:
return "Control the number of Auto-CRC hacks applied to games.\n\n"
"Automatic:\nAutomatically sets the recommended CRC hack level based on the selected renderer.\n"

View File

@ -419,7 +419,6 @@ void GSSettingsDlg::UpdateControls()
EnableWindow(GetDlgItem(m_hWnd, IDC_CUSTOM_TEXT), hw && !integer_scaling);
EnableWindow(GetDlgItem(m_hWnd, IDC_UPSCALE_MULTIPLIER), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_UPSCALE_MULTIPLIER_TEXT), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_FILTER), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_PALTEX), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_LOGZ), dx9 && hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_FBA), dx9 && hw);
@ -430,7 +429,6 @@ void GSSettingsDlg::UpdateControls()
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);
@ -696,6 +694,7 @@ void GSHacksDlg::OnInit()
CheckDlgButton(m_hWnd, IDC_UNSCALE_POINT_LINE, theApp.GetConfigB("UserHacks_unscale_point_line"));
CheckDlgButton(m_hWnd, IDC_MEMORY_WRAPPING, theApp.GetConfigB("wrap_gs_mem"));
ComboBoxInit(IDC_TRI_FILTER, theApp.m_gs_trifilter, theApp.GetConfigI("UserHacks_TriFilter"));
ComboBoxInit(IDC_OFFSETHACK, theApp.m_gs_offset_hack, theApp.GetConfigI("UserHacks_HalfPixelOffset"));
ComboBoxInit(IDC_ROUND_SPRITE, theApp.m_gs_hack, theApp.GetConfigI("UserHacks_round_sprite_offset"));
ComboBoxInit(IDC_SPRITEHACK, theApp.m_gs_hack, theApp.GetConfigI("UserHacks_SpriteHack"));
@ -719,6 +718,8 @@ void GSHacksDlg::OnInit()
// OpenGL-only hacks:
EnableWindow(GetDlgItem(m_hWnd, IDC_TC_DEPTH), ogl);
EnableWindow(GetDlgItem(m_hWnd, IDC_TRI_FILTER), ogl);
EnableWindow(GetDlgItem(m_hWnd, IDC_TRI_FILTER_TEXT), ogl);
EnableWindow(GetDlgItem(m_hWnd, IDC_UNSCALE_POINT_LINE), ogl && !native);
// Upscaling hacks:
@ -757,6 +758,7 @@ void GSHacksDlg::OnInit()
AddTooltip(IDC_AUTO_FLUSH);
AddTooltip(IDC_UNSCALE_POINT_LINE);
AddTooltip(IDC_MEMORY_WRAPPING);
AddTooltip(IDC_TRI_FILTER);
AddTooltip(IDC_GEOMETRY_SHADER_OVERRIDE);
AddTooltip(IDC_IMAGE_LOAD_STORE);
}
@ -777,6 +779,10 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
case IDOK:
{
INT_PTR data;
if (ComboBoxGetSelData(IDC_TRI_FILTER, data))
{
theApp.SetConfig("UserHacks_TriFilter", (int)data);
}
if (ComboBoxGetSelData(IDC_ROUND_SPRITE, data))
{
theApp.SetConfig("UserHacks_round_sprite_offset", (int)data);

View File

@ -111,12 +111,13 @@ IDB_PSX_NULL BITMAP "res\\psx-logo-null.bmp"
// Dialog
//
IDD_HACKS DIALOGEX 0, 0, 210, 278
IDD_HACKS DIALOGEX 0, 0, 210, 286
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Advanced Settings & Hacks"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
GROUPBOX "USE AT YOUR OWN RISK!",IDC_STATIC,7,7,196,187,0,WS_EX_TRANSPARENT
// Hacks settings:
GROUPBOX "USE AT YOUR OWN RISK!",IDC_STATIC,7,7,196,202,0,WS_EX_TRANSPARENT
CONTROL "Align Sprite",IDC_ALIGN_SPRITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,19,58,8
CONTROL "Wild Arms Offset",IDC_WILDHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,19,70,8
CONTROL "Fast Texture Invalidation",IDC_FAST_TC_INV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,32,92,8
@ -129,30 +130,32 @@ BEGIN
CONTROL "Alpha Stencil",IDC_ALPHASTENCIL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,71,57,8
RTEXT "MSAA:",IDC_MSAA_TEXT,54,86,22,8
COMBOBOX IDC_MSAACB,80,83,116,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Half-pixel Offset:",IDC_OFFSETHACK_TEXT,14,101,62,8
COMBOBOX IDC_OFFSETHACK,80,98,116,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Sprite:",IDC_SPRITEHACK_TEXT,54,116,22,8
COMBOBOX IDC_SPRITEHACK,80,113,116,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Round Sprite:",IDC_ROUND_SPRITE_TEXT,31,131,45,8
COMBOBOX IDC_ROUND_SPRITE,80,128,116,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Skipdraw:",IDC_STATIC,44,146,32,8
EDITTEXT IDC_SKIPDRAWHACKEDIT,80,143,116,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_SKIPDRAWHACK,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,105,144,11,14
RTEXT "TC Offset X:",IDC_STATIC,32,161,44,8
EDITTEXT IDC_TCOFFSETX2,80,158,116,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_TCOFFSETX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,127,156,11,14
RTEXT "TC Offset Y:",IDC_STATIC,32,176,44,8
EDITTEXT IDC_TCOFFSETY2,80,173,116,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_TCOFFSETY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,127,171,11,14
RTEXT "Trilinear Filtering:",IDC_TRI_FILTER_TEXT,16,101,60,8
COMBOBOX IDC_TRI_FILTER,80,98,116,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Half-pixel Offset:",IDC_OFFSETHACK_TEXT,14,116,62,8
COMBOBOX IDC_OFFSETHACK,80,113,116,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Sprite:",IDC_SPRITEHACK_TEXT,54,131,22,8
COMBOBOX IDC_SPRITEHACK,80,128,116,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Round Sprite:",IDC_ROUND_SPRITE_TEXT,31,146,45,8
COMBOBOX IDC_ROUND_SPRITE,80,143,116,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Skipdraw:",IDC_STATIC,44,161,32,8
EDITTEXT IDC_SKIPDRAWHACKEDIT,80,158,116,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_SKIPDRAWHACK,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,105,156,11,14
RTEXT "TC Offset X:",IDC_STATIC,32,176,44,8
EDITTEXT IDC_TCOFFSETX2,80,173,116,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_TCOFFSETX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,127,171,11,14
RTEXT "TC Offset Y:",IDC_STATIC,32,191,44,8
EDITTEXT IDC_TCOFFSETY2,80,188,116,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_TCOFFSETY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,127,186,11,14
// OpenGL Advanced Settings:
GROUPBOX "OpenGL Very Advanced Custom Settings",IDC_STATIC,7,200,196,48,0,WS_EX_TRANSPARENT
RTEXT "Geometry Shader:",IDC_GEOMETRY_SHADER_TEXT,14,215,62,8
COMBOBOX IDC_GEOMETRY_SHADER_OVERRIDE,80,213,97,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Image Load Store:",IDC_IMAGE_LOAD_STORE_TEXT,14,231,62,8
COMBOBOX IDC_IMAGE_LOAD_STORE,80,228,97,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
GROUPBOX "OpenGL Very Advanced Custom Settings",IDC_STATIC,7,212,196,48,0,WS_EX_TRANSPARENT
RTEXT "Geometry Shader:",IDC_GEOMETRY_SHADER_TEXT,14,227,62,8
COMBOBOX IDC_GEOMETRY_SHADER_OVERRIDE,80,224,97,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Image Load Store:",IDC_IMAGE_LOAD_STORE_TEXT,14,242,62,8
COMBOBOX IDC_IMAGE_LOAD_STORE,80,239,97,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
// General Settings:
DEFPUSHBUTTON "OK",IDOK,52,258,50,14
DEFPUSHBUTTON "Cancel",IDCANCEL,108,258,50,14
DEFPUSHBUTTON "OK",IDOK,52,265,50,14
DEFPUSHBUTTON "Cancel",IDCANCEL,108,265,50,14
END
IDD_SHADER DIALOGEX 0, 0, 248, 230
@ -257,7 +260,7 @@ BEGIN
CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,157,49,10
END
IDD_CONFIG DIALOGEX 0, 0, 243, 405
IDD_CONFIG DIALOGEX 0, 0, 243, 386
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "GSdx Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@ -274,42 +277,42 @@ BEGIN
COMBOBOX IDC_RENDERER,71,70,166,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Interlacing (F5):",IDC_STATIC,6,87,52,8
COMBOBOX IDC_INTERLACE,71,85,166,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "OpenCL Device:",IDC_OPENCL_TEXT,6,102,53,8
COMBOBOX IDC_OPENCL_DEVICE,71,100,166,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Shader Configuration",IDC_SHADEBUTTON,124,339,107,14
PUSHBUTTON "OSD Configuration",IDC_OSDBUTTON,11,339,107,14
DEFPUSHBUTTON "OK",IDOK,69,386,50,14
PUSHBUTTON "Cancel",IDCANCEL,125,386,50,14
LTEXT "Texture Filtering:",IDC_FILTER_TEXT,6,102,79,8
COMBOBOX IDC_FILTER,71,100,166,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "OpenCL Device:",IDC_OPENCL_TEXT,6,117,53,8
COMBOBOX IDC_OPENCL_DEVICE,71,115,166,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Shader Configuration",IDC_SHADEBUTTON,124,340,107,14
PUSHBUTTON "OSD Configuration",IDC_OSDBUTTON,11,340,107,14
DEFPUSHBUTTON "OK",IDOK,69,366,50,14
PUSHBUTTON "Cancel",IDCANCEL,125,366,50,14
// Hardware Renderer Settings:
GROUPBOX "Hardware Renderer Settings",IDC_STATIC,6,116,231,136,BS_CENTER
CONTROL "Allow 8-Bit Textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,128,90,10
CONTROL "Large Framebuffer",IDC_LARGE_FB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,105,128,90,10
LTEXT "Internal Resolution:",IDC_UPSCALE_MULTIPLIER_TEXT,22,144,79,8
COMBOBOX IDC_UPSCALE_MULTIPLIER,105,142,127,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Custom Resolution:",IDC_CUSTOM_TEXT,22,160,79,8
EDITTEXT IDC_RESX_EDIT,105,158,61,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_RESX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,145,158,11,14
EDITTEXT IDC_RESY_EDIT,171,158,61,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_RESY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,221,158,11,14
LTEXT "Texture Filtering:",IDC_FILTER_TEXT,22,176,79,8
COMBOBOX IDC_FILTER,105,174,127,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Hardware Renderer Settings",IDC_STATIC,6,132,231,152,BS_CENTER
CONTROL "Allow 8-Bit Textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,144,90,10
CONTROL "Large Framebuffer",IDC_LARGE_FB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,105,144,90,10
LTEXT "Internal Resolution:",IDC_UPSCALE_MULTIPLIER_TEXT,22,160,79,8
COMBOBOX IDC_UPSCALE_MULTIPLIER,105,158,127,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Custom Resolution:",IDC_CUSTOM_TEXT,22,176,79,8
EDITTEXT IDC_RESX_EDIT,105,174,61,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_RESX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,145,174,11,14
EDITTEXT IDC_RESY_EDIT,171,174,61,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_RESY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,221,174,11,14
LTEXT "Anisotropic Filtering:",IDC_AFCOMBO_TEXT,22,192,79,8
COMBOBOX IDC_AFCOMBO,105,190,127,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Mipmapping (Ins):",IDC_MIPMAP_HW_TEXT,22,208,79,8
COMBOBOX IDC_MIPMAP_HW,105,206,127,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "CRC Hack Level:",IDC_CRC_LEVEL_TEXT,22,224,79,8
COMBOBOX IDC_CRC_LEVEL,105,222,127,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Enable HW Hacks",IDC_HACKS_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,223,71,10
COMBOBOX IDC_CRC_LEVEL,105,220,127,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Enable HW Hacks",IDC_HACKS_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,239,71,10
PUSHBUTTON "Advanced Settings and Hacks",IDC_HACKSBUTTON,105,237,127,14
// OpenGL (Hardware) Settings:
CONTROL "Accurate Date",IDC_ACCURATE_DATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,255,72,8
CONTROL "Accurate Date",IDC_ACCURATE_DATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,253,72,8
LTEXT "Blending Unit Accuracy:",IDC_ACCURATE_BLEND_UNIT_TEXT,22,268,79,10
COMBOBOX IDC_ACCURATE_BLEND_UNIT,105,267,127,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
// Direct3D 9 (Hardware) Settings:
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,255,90,8
CONTROL "Alpha Correction",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,105,255,74,8
// Software Renderer Settings:
GROUPBOX "Software Renderer Settings",IDC_STATIC,6,291,231,40,BS_CENTER
GROUPBOX "Software Renderer Settings",IDC_STATIC,6,291,231,42,BS_CENTER
CONTROL "Edge Anti-aliasing (AA1)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,303,91,10
LTEXT "Rendering threads:",IDC_SWTHREADS_TEXT,124,304,80,8
EDITTEXT IDC_SWTHREADS_EDIT,198,302,34,13,ES_AUTOHSCROLL | ES_NUMBER

View File

@ -99,6 +99,8 @@
#define IDC_FAST_TC_INV 2120
#define IDC_AUTO_FLUSH 2121
#define IDC_MEMORY_WRAPPING 2122
#define IDC_TRI_FILTER 2123
#define IDC_TRI_FILTER_TEXT 2124
// Shader:
#define IDC_SHADEBOOST 2140
#define IDC_FXAA 2141