diff --git a/plugins/GSdx/GSSetting.cpp b/plugins/GSdx/GSSetting.cpp index 6a901526ef..0c977ac423 100644 --- a/plugins/GSdx/GSSetting.cpp +++ b/plugins/GSdx/GSSetting.cpp @@ -123,11 +123,12 @@ const char* dialog_message(int ID, bool* updateText) { return "Makes textures partially or fully transparent as required by emulation. May cause unusual slowdowns for some games."; case IDC_LOGZ: return "Treat depth as logarithmic instead of linear. Recommended setting is on unless it causes graphical glitches."; + // Exclusive for Hardware Renderer + case IDC_PRELOAD_GS: + return "Uploads GS data when rendering a new frame to reproduce some effects accurately. Fixes black screen issues in games like Armored Core: Last Raven."; #endif -#ifdef __linux__ case IDC_MIPMAP: return "Enables mipmapping, which some games require to render correctly. Turn off only for debug purposes."; -#endif default: if (updateText) *updateText = false; diff --git a/plugins/GSdx/GSSettingsDlg.cpp b/plugins/GSdx/GSSettingsDlg.cpp index 436f3afd94..a510ce72a6 100644 --- a/plugins/GSdx/GSSettingsDlg.cpp +++ b/plugins/GSdx/GSSettingsDlg.cpp @@ -159,6 +159,7 @@ void GSSettingsDlg::OnInit() CheckDlgButton(m_hWnd, IDC_LOGZ, theApp.GetConfig("logz", 1)); CheckDlgButton(m_hWnd, IDC_FBA, theApp.GetConfig("fba", 1)); CheckDlgButton(m_hWnd, IDC_AA1, theApp.GetConfig("aa1", 0)); + CheckDlgButton(m_hWnd, IDC_MIPMAP, theApp.GetConfig("mipmap", 1)); CheckDlgButton(m_hWnd, IDC_ACCURATE_DATE, theApp.GetConfig("accurate_date", 0)); CheckDlgButton(m_hWnd, IDC_TC_DEPTH, theApp.GetConfig("texture_cache_depth", 0)); @@ -193,6 +194,7 @@ void GSSettingsDlg::OnInit() AddTooltip(IDC_TC_DEPTH); AddTooltip(IDC_AFCOMBO); AddTooltip(IDC_AA1); + AddTooltip(IDC_MIPMAP); AddTooltip(IDC_SWTHREADS); AddTooltip(IDC_SWTHREADS_EDIT); AddTooltip(IDC_SHADEBOOST); @@ -303,6 +305,7 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code) theApp.SetConfig("logz", (int)IsDlgButtonChecked(m_hWnd, IDC_LOGZ)); theApp.SetConfig("fba", (int)IsDlgButtonChecked(m_hWnd, IDC_FBA)); theApp.SetConfig("aa1", (int)IsDlgButtonChecked(m_hWnd, IDC_AA1)); + theApp.SetConfig("mipmap", (int)IsDlgButtonChecked(m_hWnd, IDC_MIPMAP)); theApp.SetConfig("resx", (int)SendMessage(GetDlgItem(m_hWnd, IDC_RESX), UDM_GETPOS, 0, 0)); theApp.SetConfig("resy", (int)SendMessage(GetDlgItem(m_hWnd, IDC_RESY), UDM_GETPOS, 0, 0)); theApp.SetConfig("extrathreads", (int)SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_GETPOS, 0, 0)); @@ -620,6 +623,7 @@ void GSHacksDlg::OnInit() CheckDlgButton(m_hWnd, IDC_OFFSETHACK, theApp.GetConfig("UserHacks_HalfPixelOffset", 0)); CheckDlgButton(m_hWnd, IDC_WILDHACK, theApp.GetConfig("UserHacks_WildHack", 0)); CheckDlgButton(m_hWnd, IDC_ALPHASTENCIL, theApp.GetConfig("UserHacks_AlphaStencil", 0)); + CheckDlgButton(m_hWnd, IDC_PRELOAD_GS, theApp.GetConfig("preload_frame_with_gs_data", 0)); CheckDlgButton(m_hWnd, IDC_ALIGN_SPRITE, theApp.GetConfig("UserHacks_align_sprite_X", 0)); ComboBoxInit(IDC_ROUND_SPRITE, theApp.m_gs_hack, theApp.GetConfig("UserHacks_round_sprite_offset", 0)); @@ -651,6 +655,7 @@ void GSHacksDlg::OnInit() AddTooltip(IDC_TCOFFSETX2); AddTooltip(IDC_TCOFFSETY); AddTooltip(IDC_TCOFFSETY2); + AddTooltip(IDC_PRELOAD_GS); } void GSHacksDlg::UpdateControls() @@ -683,6 +688,7 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) 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)); + theApp.SetConfig("preload_frame_with_gs_data", (int)IsDlgButtonChecked(m_hWnd, IDC_PRELOAD_GS)); theApp.SetConfig("Userhacks_align_sprite_X", (int)IsDlgButtonChecked(m_hWnd, IDC_ALIGN_SPRITE)); unsigned int TCOFFSET = SendMessage(GetDlgItem(m_hWnd, IDC_TCOFFSETX), UDM_GETPOS, 0, 0) & 0xFFFF; diff --git a/plugins/GSdx/GSdx.rc b/plugins/GSdx/GSdx.rc index 3c9c734bbb..402e787021 100644 --- a/plugins/GSdx/GSdx.rc +++ b/plugins/GSdx/GSdx.rc @@ -89,13 +89,14 @@ IDB_LOGOGL BITMAP "res\\logo-ogl.bmp" // Dialog // -IDD_HACKS DIALOGEX 0, 0, 147, 182 +IDD_HACKS DIALOGEX 0, 0, 147, 200 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,84,163,56,14 - GROUPBOX "USE AT YOUR OWN RISK!",IDC_STATIC,7,7,133,155,0,WS_EX_TRANSPARENT + DEFPUSHBUTTON "OK",IDOK,84,181,56,14 + GROUPBOX "USE AT YOUR OWN RISK!",IDC_STATIC,7,7,133,171,0,WS_EX_TRANSPARENT + CONTROL "Preload Data Frame",IDC_PRELOAD_GS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,95,80,8 RTEXT "MSAA:",IDC_STATIC,58,20,22,8 RTEXT "Skipdraw:",IDC_STATIC,48,36,32,8 EDITTEXT IDC_SKIPDRAWHACKEDIT,84,33,48,14,ES_RIGHT | ES_AUTOHSCROLL @@ -106,16 +107,16 @@ BEGIN CONTROL "Wild Arms Offset",IDC_WILDHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,64,64,8 CONTROL "Alpha Stencil",IDC_ALPHASTENCIL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,77,57,8 CONTROL "Align Sprite",IDC_ALIGN_SPRITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,84,51,48,8 - RTEXT "TC Offset X:",IDC_STATIC,36,128,44,8 - EDITTEXT IDC_TCOFFSETX2,84,126,48,14,ES_RIGHT | ES_AUTOHSCROLL - CONTROL "",IDC_TCOFFSETX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,121,127,11,14 - EDITTEXT IDC_TCOFFSETY2,84,144,48,14,ES_RIGHT | ES_AUTOHSCROLL - CONTROL "",IDC_TCOFFSETY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,121,144,11,14 - RTEXT "TC Offset Y:",IDC_STATIC,32,147,48,8 - COMBOBOX IDC_ROUND_SPRITE,84,91,48,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - RTEXT "Round Sprite:",IDC_STATIC,35,93,45,8 - RTEXT "Sprite:",IDC_STATIC,58,109,22,8 - COMBOBOX IDC_SPRITEHACK,84,107,48,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + RTEXT "TC Offset X:",IDC_STATIC,36,146,44,8 + EDITTEXT IDC_TCOFFSETX2,84,144,48,14,ES_RIGHT | ES_AUTOHSCROLL + CONTROL "",IDC_TCOFFSETX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,121,145,11,14 + EDITTEXT IDC_TCOFFSETY2,84,162,48,14,ES_RIGHT | ES_AUTOHSCROLL + CONTROL "",IDC_TCOFFSETY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,121,162,11,14 + RTEXT "TC Offset Y:",IDC_STATIC,32,165,48,8 + COMBOBOX IDC_ROUND_SPRITE,84,109,48,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + RTEXT "Round Sprite:",IDC_STATIC,35,111,45,8 + RTEXT "Sprite:",IDC_STATIC,58,127,22,8 + COMBOBOX IDC_SPRITEHACK,84,125,48,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END IDD_SHADEBOOST DIALOGEX 0, 0, 316, 129 @@ -181,7 +182,7 @@ BEGIN CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,157,49,10 END -IDD_CONFIG DIALOGEX 0, 0, 243, 412 +IDD_CONFIG DIALOGEX 0, 0, 243, 422 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "GSdx Settings" FONT 8, "MS Shell Dlg", 400, 0, 0x1 @@ -213,31 +214,32 @@ BEGIN LTEXT "CRC Hack Level:",IDC_CRC_LEVEL_TEXT,22,208,79,8 COMBOBOX IDC_CRC_LEVEL,105,206,127,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Enable HW Hacks",IDC_HACKS_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,223,71,10 - PUSHBUTTON "Configure Hacks...",IDC_HACKSBUTTON,105,221,127,14 + PUSHBUTTON "Configure Hacks",IDC_HACKSBUTTON,105,221,127,14 CONTROL "Accurate Date",IDC_ACCURATE_DATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,105,239,67,8 CONTROL "Hardware Depth",IDC_TC_DEPTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,239,72,8 LTEXT "Blending Unit Accuracy:",IDC_ACCURATE_BLEND_UNIT_TEXT,22,252,79,10 COMBOBOX IDC_ACCURATE_BLEND_UNIT,105,251,127,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,239,90,8 CONTROL "Alpha Correction",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,105,239,74,8 - GROUPBOX "Software Mode Settings",IDC_STATIC,6,269,231,25,BS_CENTER + CONTROL "Mipmapping", IDC_MIPMAP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,296,90,8 + GROUPBOX "Software Mode Settings",IDC_STATIC,6,267,231,40,BS_CENTER CONTROL "Edge Anti-aliasing (AA1)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,279,91,10 LTEXT "Extra rendering threads:",IDC_STATIC,116,280,83,8 EDITTEXT IDC_SWTHREADS_EDIT,198,278,34,13,ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,221,277,11,14 - GROUPBOX "Custom Shader Settings",IDC_STATIC,6,295,231,94,BS_CENTER - CONTROL "Enable Shade Boost",IDC_SHADEBOOST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,307,90,10 - PUSHBUTTON "Configure Shade Boost...",IDC_SHADEBUTTON,105,305,127,14 - CONTROL "Enable External Shader",IDC_SHADER_FX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,322,90,10 - CONTROL "Enable FXAA",IDC_FXAA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,105,322,61,10 - LTEXT "External Shader",IDC_SHADER_FX_TEXT,22,337,52,8 - EDITTEXT IDC_SHADER_FX_EDIT,22,345,170,14,ES_AUTOHSCROLL - PUSHBUTTON "Browse",IDC_SHADER_FX_BUTTON,196,345,36,14 - LTEXT "External Shader Config",IDC_SHADER_FX_CONF_TEXT,22,362,75,8 - EDITTEXT IDC_SHADER_FX_CONF_EDIT,22,371,170,14,ES_AUTOHSCROLL - PUSHBUTTON "Browse",IDC_SHADER_FX_CONF_BUTTON,196,371,36,14 - DEFPUSHBUTTON "OK",IDOK,69,392,50,14 - PUSHBUTTON "Cancel",IDCANCEL,125,392,50,14 + GROUPBOX "Custom Shader Settings",IDC_STATIC,6,305,231,94,BS_CENTER + CONTROL "Enable Shade Boost",IDC_SHADEBOOST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,317,90,10 + PUSHBUTTON "Configure Shade Boost",IDC_SHADEBUTTON,105,315,127,14 + CONTROL "Enable External Shader",IDC_SHADER_FX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,332,90,10 + CONTROL "Enable FXAA",IDC_FXAA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,105,332,61,10 + LTEXT "External Shader",IDC_SHADER_FX_TEXT,22,347,52,8 + EDITTEXT IDC_SHADER_FX_EDIT,22,355,170,14,ES_AUTOHSCROLL + PUSHBUTTON "Browse",IDC_SHADER_FX_BUTTON,196,355,36,14 + LTEXT "External Shader Config",IDC_SHADER_FX_CONF_TEXT,22,372,75,8 + EDITTEXT IDC_SHADER_FX_CONF_EDIT,22,381,170,14,ES_AUTOHSCROLL + PUSHBUTTON "Browse",IDC_SHADER_FX_CONF_BUTTON,196,381,36,14 + DEFPUSHBUTTON "OK",IDOK,69,402,50,14 + PUSHBUTTON "Cancel",IDCANCEL,125,402,50,14 END diff --git a/plugins/GSdx/resource.h b/plugins/GSdx/resource.h index a839a7eaa6..0c18ab94e0 100644 --- a/plugins/GSdx/resource.h +++ b/plugins/GSdx/resource.h @@ -95,6 +95,8 @@ #define IDR_SHADEBOOST_FX 10007 #define IDR_TFX_CL 10008 #define IDD_HACKS 10009 +#define IDC_MIPMAP 10010 +#define IDC_PRELOAD_GS 10011 #define IDC_STATIC -1 // Next default values for new objects