gsdx windows: update gui to add a HPO v2 checkbox

Squash done by greg

v2: update tooltip
This commit is contained in:
woj1993 2017-02-25 15:35:32 +01:00 committed by Gregory Hainaut
parent 8f02052232
commit 4a6a3af418
6 changed files with 126 additions and 108 deletions

View File

@ -55,7 +55,9 @@ const char* dialog_message(int ID, bool* updateText) {
case IDC_ALPHAHACK:
return "Different alpha handling. Can work around some shadow problems.";
case IDC_OFFSETHACK:
return "Might fix some misaligned fog, bloom, or blend effect.";
return "Might fix some misaligned fog, bloom, or blend effect.\n"
"The preferred option is Normal (Vertex) as it is most likely to resolve misalignment issues.\n"
"The special cases are only useful in a couple of games like Captain Tsubasa.";
case IDC_SPRITEHACK:
return "Helps getting rid of black inner lines in some filtered sprites."
" Half option is the preferred one. Use it for Mana Khemia or Ar tonelico for example."

View File

@ -714,7 +714,6 @@ void GSHacksDlg::OnInit()
SendMessage(GetDlgItem(m_hWnd, IDC_MSAACB), CB_SETCURSEL, msaa2cb[min(theApp.GetConfigI("UserHacks_MSAA"), 16)], 0);
CheckDlgButton(m_hWnd, IDC_ALPHAHACK, theApp.GetConfigB("UserHacks_AlphaHack"));
CheckDlgButton(m_hWnd, IDC_OFFSETHACK, theApp.GetConfigB("UserHacks_HalfPixelOffset"));
CheckDlgButton(m_hWnd, IDC_WILDHACK, theApp.GetConfigI("UserHacks_WildHack"));
CheckDlgButton(m_hWnd, IDC_ALPHASTENCIL, theApp.GetConfigB("UserHacks_AlphaStencil"));
CheckDlgButton(m_hWnd, IDC_PRELOAD_GS, theApp.GetConfigB("preload_frame_with_gs_data"));
@ -723,7 +722,12 @@ void GSHacksDlg::OnInit()
CheckDlgButton(m_hWnd, IDC_FAST_TC_INV, theApp.GetConfigB("UserHacks_DisablePartialInvalidation"));
CheckDlgButton(m_hWnd, IDC_AUTO_FLUSH, theApp.GetConfigB("UserHacks_AutoFlush"));
CheckDlgButton(m_hWnd, IDC_UNSCALE_POINT_LINE, theApp.GetConfigB("UserHacks_unscale_point_line"));
std::vector<GSSetting> hpo_combobox = theApp.m_gs_offset_hack;
if (!ogl)
{
hpo_combobox.erase(hpo_combobox.begin() + 2, hpo_combobox.begin() + 4);
}
ComboBoxInit(IDC_OFFSETHACK, hpo_combobox,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"));
@ -745,6 +749,7 @@ void GSHacksDlg::OnInit()
EnableWindow(GetDlgItem(m_hWnd, IDC_SPRITEHACK), !native);
EnableWindow(GetDlgItem(m_hWnd, IDC_WILDHACK), !native);
EnableWindow(GetDlgItem(m_hWnd, IDC_OFFSETHACK), !native);
EnableWindow(GetDlgItem(m_hWnd, IDC_OFFSETHACK_TEXT), !native);
EnableWindow(GetDlgItem(m_hWnd, IDC_ALIGN_SPRITE), !native);
EnableWindow(GetDlgItem(m_hWnd, IDC_ROUND_SPRITE), !native);
EnableWindow(GetDlgItem(m_hWnd, IDC_SPRITEHACK_TEXT), !native);
@ -795,9 +800,12 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
{
theApp.SetConfig("UserHacks_SpriteHack", (int)data);
}
if (ComboBoxGetSelData(IDC_OFFSETHACK, data))
{
theApp.SetConfig("UserHacks_HalfPixelOffset", (int)data);
}
theApp.SetConfig("UserHacks_MSAA", cb2msaa[(int)SendMessage(GetDlgItem(m_hWnd, IDC_MSAACB), CB_GETCURSEL, 0, 0)]);
theApp.SetConfig("UserHacks_AlphaHack", (int)IsDlgButtonChecked(m_hWnd, IDC_ALPHAHACK));
theApp.SetConfig("UserHacks_HalfPixelOffset", (int)IsDlgButtonChecked(m_hWnd, IDC_OFFSETHACK));
theApp.SetConfig("UserHacks_SkipDraw", (int)SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_GETPOS, 0, 0));
theApp.SetConfig("UserHacks_WildHack", (int)IsDlgButtonChecked(m_hWnd, IDC_WILDHACK));
theApp.SetConfig("UserHacks_AlphaStencil", (int)IsDlgButtonChecked(m_hWnd, IDC_ALPHASTENCIL));

View File

@ -216,6 +216,11 @@ void GSdxApp::Init()
m_gs_hack.push_back(GSSetting(1, "Half", ""));
m_gs_hack.push_back(GSSetting(2, "Full", ""));
m_gs_offset_hack.push_back(GSSetting(0, "Off", ""));
m_gs_offset_hack.push_back(GSSetting(1, "Normal", "Vertex"));
m_gs_offset_hack.push_back(GSSetting(2, "Special", "Texture"));
m_gs_offset_hack.push_back(GSSetting(3, "Special", "Texture - aggressive"));
m_gs_hw_mipmapping.push_back(GSSetting(0, "Off", ""));
m_gs_hw_mipmapping.push_back(GSSetting(1, "Basic", "Fast"));
m_gs_hw_mipmapping.push_back(GSSetting(2, "Full", "Slow"));

View File

@ -71,6 +71,7 @@ public:
vector<GSSetting> m_gs_filter;
vector<GSSetting> m_gs_gl_ext;
vector<GSSetting> m_gs_hack;
vector<GSSetting> m_gs_offset_hack;
vector<GSSetting> m_gs_hw_mipmapping;
vector<GSSetting> m_gs_crc_level;
vector<GSSetting> m_gs_acc_blend_level;

View File

@ -111,39 +111,40 @@ IDB_PSX_NULL BITMAP "res\\psx-logo-null.bmp"
// Dialog
//
IDD_HACKS DIALOGEX 0, 0, 161, 235
IDD_HACKS DIALOGEX 0, 0, 218, 225
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Hacks Configuration"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,27,214,50,14
DEFPUSHBUTTON "Cancel",IDCANCEL,84,214,50,14
GROUPBOX "USE AT YOUR OWN RISK!",IDC_STATIC,7,7,147,206,0,WS_EX_TRANSPARENT
CONTROL "Preload Frame Data",IDC_PRELOAD_GS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,115,80,8
DEFPUSHBUTTON "OK",IDOK,56,199,50,14
DEFPUSHBUTTON "Cancel",IDCANCEL,112,199,50,14
GROUPBOX "USE AT YOUR OWN RISK!",IDC_STATIC,7,7,205,190,0,WS_EX_TRANSPARENT
CONTROL "Preload Frame Data",IDC_PRELOAD_GS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,77,80,8
RTEXT "MSAA:",IDC_MSAA_TEXT,62,20,22,8
RTEXT "Skipdraw:",IDC_STATIC,52,36,32,8
EDITTEXT IDC_SKIPDRAWHACKEDIT,88,33,58,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_SKIPDRAWHACK,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,113,34,11,14
CONTROL "Alpha",IDC_ALPHAHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,88,64,34,8
CONTROL "Half-pixel Offset",IDC_OFFSETHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,51,70,8
COMBOBOX IDC_MSAACB,88,17,58,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Wild Arms Offset",IDC_WILDHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,64,70,8
CONTROL "Unscale Point Line", IDC_UNSCALE_POINT_LINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,77,90,8
CONTROL "Alpha Stencil",IDC_ALPHASTENCIL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,88,77,57,8
CONTROL "Align Sprite",IDC_ALIGN_SPRITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,88,51,58,8
CONTROL "Disable Depth Emulation",IDC_TC_DEPTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,90,92,8
RTEXT "TC Offset X:",IDC_STATIC,40,179,44,8
EDITTEXT IDC_TCOFFSETX2,88,176,58,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_TCOFFSETX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,135,174,11,14
EDITTEXT IDC_TCOFFSETY2,88,194,58,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_TCOFFSETY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,135,192,11,14
COMBOBOX IDC_ROUND_SPRITE,88,141,58,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Round Sprite:",IDC_ROUND_SPRITE_TEXT,39,144,45,8
RTEXT "Sprite:",IDC_SPRITEHACK_TEXT,62,160,22,8
COMBOBOX IDC_SPRITEHACK,88,158,58,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Fast Texture Invalidation",IDC_FAST_TC_INV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,102,92,8
CONTROL "Auto Flush", IDC_AUTO_FLUSH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,128,70,8
RTEXT "TC Offset Y:",IDC_STATIC,40,197,44,8
EDITTEXT IDC_SKIPDRAWHACKEDIT,88,33,116,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_SKIPDRAWHACK,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,193,34,11,14
CONTROL "Alpha",IDC_ALPHAHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,103,34,8
COMBOBOX IDC_OFFSETHACK,88,115,116,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Half-pixel Offset:",IDC_OFFSETHACK_TEXT,14,118,70,8
COMBOBOX IDC_MSAACB,88,17,116,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Wild Arms Offset",IDC_WILDHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,51,70,8
CONTROL "Unscale Point Line", IDC_UNSCALE_POINT_LINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,64,90,8
CONTROL "Alpha Stencil",IDC_ALPHASTENCIL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,103,57,8
CONTROL "Align Sprite",IDC_ALIGN_SPRITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,51,58,8
CONTROL "Disable Depth Emulation",IDC_TC_DEPTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,64,92,8
RTEXT "TC Offset X:",IDC_STATIC,40,165,44,8
EDITTEXT IDC_TCOFFSETX2,88,162,116,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_TCOFFSETX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,193,160,11,14
EDITTEXT IDC_TCOFFSETY2,88,177,116,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_TCOFFSETY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,193,175,11,14
COMBOBOX IDC_ROUND_SPRITE,88,131,116,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Round Sprite:",IDC_ROUND_SPRITE_TEXT,39,133,45,8
RTEXT "Sprite:",IDC_SPRITEHACK_TEXT,62,148,22,8
COMBOBOX IDC_SPRITEHACK,88,147,116,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Fast Texture Invalidation",IDC_FAST_TC_INV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,77,92,8
CONTROL "Auto Flush",IDC_AUTO_FLUSH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,90,55,8
RTEXT "TC Offset Y:",IDC_STATIC,40,183,44,8
END
IDD_SHADER DIALOGEX 0, 0, 248, 250

View File

@ -45,82 +45,83 @@
#define IDC_UPSCALE_MULTIPLIER 2041
#define IDC_BROWSE 2042
#define IDC_OFFSETHACK 2043
#define IDC_FILENAME 2044
#define IDC_SKIPDRAWHACK 2045
#define IDC_WIDTH 2046
#define IDC_HEIGHT 2047
#define IDC_CONFIGURE 2048
#define IDC_ACCURATE_BLEND_UNIT_TEXT 2049
#define IDC_WINDOWED 2050
#define IDC_SKIPDRAWHACKEDIT 2051
#define IDC_SPRITEHACK 2052
#define IDC_SPRITEHACK_TEXT 2053
#define IDC_SATURATION_SLIDER 2054
#define IDC_BRIGHTNESS_SLIDER 2055
#define IDC_CONTRAST_SLIDER 2056
#define IDC_SHADEBUTTON 2057
#define IDC_SHADEBOOST 2058
#define IDC_HACKS_ENABLED 2059
#define IDC_SATURATION_TEXT 2060
#define IDC_BRIGHTNESS_TEXT 2061
#define IDC_CONTRAST_TEXT 2062
#define IDC_MSAACB 2063
#define IDC_MSAA_TEXT 2064
#define IDC_HACKSBUTTON 2065
#define IDC_WILDHACK 2066
#define IDC_CHECK_DISABLE_ALL_HACKS 2067
#define IDC_ALPHASTENCIL 2068
#define IDC_ADAPTER 2069
#define IDC_TCOFFSETX 2070
#define IDC_TCOFFSETX2 2071
#define IDC_TCOFFSETY 2072
#define IDC_TCOFFSETY2 2073
#define IDC_FXAA 2074
#define IDC_SHADER_FX 2075
#define IDC_AFCOMBO_TEXT 2076
#define IDC_AFCOMBO 2077
#define IDC_OPENCL_DEVICE 2078
#define IDC_OPENCL_TEXT 2079
#define IDC_ACCURATE_BLEND_UNIT 2080
#define IDC_ACCURATE_DATE 2081
#define IDC_ROUND_SPRITE 2082
#define IDC_ROUND_SPRITE_TEXT 2083
#define IDC_ALIGN_SPRITE 2084
#define IDC_CRC_LEVEL 2085
#define IDC_CRC_LEVEL_TEXT 2086
#define IDC_TC_DEPTH 2087
#define IDC_COLORSPACE 2088
#define IDC_SHADER_FX_EDIT 2089
#define IDC_SHADER_FX_CONF_EDIT 2090
#define IDC_SHADER_FX_BUTTON 2091
#define IDC_SHADER_FX_CONF_BUTTON 2092
#define IDC_SHADER_FX_TEXT 2093
#define IDC_SHADER_FX_CONF_TEXT 2094
#define IDC_CUSTOM_TEXT 2095
#define IDC_UPSCALE_MULTIPLIER_TEXT 2096
#define IDC_MIPMAP_HW 2097
#define IDC_MIPMAP_HW_TEXT 2098
#define IDC_MIPMAP_SW 2099
#define IDC_PRELOAD_GS 2100
#define IDC_TVSHADER 2101
#define IDC_FAST_TC_INV 2102
#define IDC_LARGE_FB 2103
#define IDC_AUTO_FLUSH 2104
#define IDC_UNSCALE_POINT_LINE 2105
#define IDC_OSD_FONT_EDIT 2106
#define IDC_OSD_FONT_BUTTON 2107
#define IDC_OSD_SPEED 2108
#define IDC_OSD_SPEED_EDIT 2109
#define IDC_OSD_SIZE 2110
#define IDC_OSD_SIZE_EDIT 2111
#define IDC_OSD_TRANSPARENCY_SLIDER 2112
#define IDC_OSD_TRANSPARENCY_TEXT 2113
#define IDC_OSD_LOG 2114
#define IDC_OSD_MONITOR 2115
#define IDC_OSD_INDICATOR 2116
#define IDC_OSDBUTTON 2117
#define IDC_OSD_MAX_LOG 2118
#define IDC_OSD_MAX_LOG_EDIT 2119
#define IDC_OFFSETHACK_TEXT 2044
#define IDC_FILENAME 2045
#define IDC_SKIPDRAWHACK 2046
#define IDC_WIDTH 2047
#define IDC_HEIGHT 2048
#define IDC_CONFIGURE 2049
#define IDC_ACCURATE_BLEND_UNIT_TEXT 2050
#define IDC_WINDOWED 2051
#define IDC_SKIPDRAWHACKEDIT 2052
#define IDC_SPRITEHACK 2053
#define IDC_SPRITEHACK_TEXT 2054
#define IDC_SATURATION_SLIDER 2055
#define IDC_BRIGHTNESS_SLIDER 2056
#define IDC_CONTRAST_SLIDER 2057
#define IDC_SHADEBUTTON 2058
#define IDC_SHADEBOOST 2059
#define IDC_HACKS_ENABLED 2060
#define IDC_SATURATION_TEXT 2061
#define IDC_BRIGHTNESS_TEXT 2062
#define IDC_CONTRAST_TEXT 2063
#define IDC_MSAACB 2064
#define IDC_MSAA_TEXT 2065
#define IDC_HACKSBUTTON 2066
#define IDC_WILDHACK 2067
#define IDC_CHECK_DISABLE_ALL_HACKS 2068
#define IDC_ALPHASTENCIL 2069
#define IDC_ADAPTER 2070
#define IDC_TCOFFSETX 2071
#define IDC_TCOFFSETX2 2072
#define IDC_TCOFFSETY 2073
#define IDC_TCOFFSETY2 2074
#define IDC_FXAA 2075
#define IDC_SHADER_FX 2076
#define IDC_AFCOMBO_TEXT 2077
#define IDC_AFCOMBO 2078
#define IDC_OPENCL_DEVICE 2079
#define IDC_OPENCL_TEXT 2080
#define IDC_ACCURATE_BLEND_UNIT 2081
#define IDC_ACCURATE_DATE 2082
#define IDC_ROUND_SPRITE 2083
#define IDC_ROUND_SPRITE_TEXT 2084
#define IDC_ALIGN_SPRITE 2085
#define IDC_CRC_LEVEL 2086
#define IDC_CRC_LEVEL_TEXT 2087
#define IDC_TC_DEPTH 2088
#define IDC_COLORSPACE 2089
#define IDC_SHADER_FX_EDIT 2090
#define IDC_SHADER_FX_CONF_EDIT 2091
#define IDC_SHADER_FX_BUTTON 2092
#define IDC_SHADER_FX_CONF_BUTTON 2093
#define IDC_SHADER_FX_TEXT 2094
#define IDC_SHADER_FX_CONF_TEXT 2095
#define IDC_CUSTOM_TEXT 2096
#define IDC_UPSCALE_MULTIPLIER_TEXT 2097
#define IDC_MIPMAP_HW 2098
#define IDC_MIPMAP_HW_TEXT 2099
#define IDC_MIPMAP_SW 2100
#define IDC_PRELOAD_GS 2101
#define IDC_TVSHADER 2102
#define IDC_FAST_TC_INV 2103
#define IDC_LARGE_FB 2104
#define IDC_AUTO_FLUSH 2105
#define IDC_UNSCALE_POINT_LINE 2106
#define IDC_OSD_FONT_EDIT 2107
#define IDC_OSD_FONT_BUTTON 2108
#define IDC_OSD_SPEED 2109
#define IDC_OSD_SPEED_EDIT 2110
#define IDC_OSD_SIZE 2111
#define IDC_OSD_SIZE_EDIT 2112
#define IDC_OSD_TRANSPARENCY_SLIDER 2113
#define IDC_OSD_TRANSPARENCY_TEXT 2114
#define IDC_OSD_LOG 2115
#define IDC_OSD_MONITOR 2116
#define IDC_OSD_INDICATOR 2117
#define IDC_OSDBUTTON 2118
#define IDC_OSD_MAX_LOG 2119
#define IDC_OSD_MAX_LOG_EDIT 2120
#define IDR_CONVERT_FX 10000
#define IDR_TFX_FX 10001
#define IDR_MERGE_FX 10002
@ -140,7 +141,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 10013
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 2106
#define _APS_NEXT_CONTROL_VALUE 2121
#define _APS_NEXT_SYMED_VALUE 5000
#endif
#endif