diff --git a/plugins/GSdx/GS.cpp b/plugins/GSdx/GS.cpp index 116230f550..11b9783e27 100644 --- a/plugins/GSdx/GS.cpp +++ b/plugins/GSdx/GS.cpp @@ -770,7 +770,7 @@ EXPORT_C GSconfigure() if(!GSUtil::CheckSSE()) return; #ifdef _WINDOWS - + GSDialog::InitCommonControls(); if(GSSettingsDlg().DoModal() == IDOK) { if(s_gs != NULL && s_gs->m_wnd->IsManaged()) diff --git a/plugins/GSdx/GSDialog.cpp b/plugins/GSdx/GSDialog.cpp index ea4c75191c..25d059b931 100644 --- a/plugins/GSdx/GSDialog.cpp +++ b/plugins/GSdx/GSDialog.cpp @@ -20,6 +20,8 @@ */ #include "StdAfx.h" +#include +#include #include "GSdx.h" #include "GSDialog.h" #include "GSVector.h" @@ -64,9 +66,48 @@ INT_PTR CALLBACK GSDialog::DialogProc(HWND hWnd, UINT message, WPARAM wParam, LP dlg = (GSDialog*)GetWindowLongPtr(hWnd, GWLP_USERDATA); + if (message == WM_NOTIFY) + { + if (((LPNMHDR)lParam)->code == TTN_GETDISPINFO) + { + LPNMTTDISPINFO pInfo = (LPNMTTDISPINFO)lParam; + UINT id = GetWindowLongPtr((HWND)pInfo->hdr.idFrom, GWL_ID); + + // lpszText is used only if hinst is NULL. Seems to be NULL already, + // but it can't hurt to explicitly set it. + pInfo->hinst = NULL; + pInfo->lpszText = (LPTSTR)dialog_message(id); + SendMessage(pInfo->hdr.hwndFrom, TTM_SETMAXTIPWIDTH, 0, 500); + return true; + } + } + return dlg != NULL ? dlg->OnMessage(message, wParam, lParam) : FALSE; } +// Tooltips will only show if the TOOLINFO cbSize <= the struct size. If it's +// smaller some functionality might be disabled. So let's try and use the +// correct size. +UINT GSDialog::GetTooltipStructSize() +{ + DLLGETVERSIONPROC dllGetVersion = (DLLGETVERSIONPROC)GetProcAddress(GetModuleHandle("ComCtl32.dll"), "DllGetVersion"); + if (dllGetVersion) { + DLLVERSIONINFO2 dllversion = { 0 }; + dllversion.info1.cbSize = sizeof(DLLVERSIONINFO2); + + if (dllGetVersion((DLLVERSIONINFO*)&dllversion) == S_OK) { + // Minor, then major version. + DWORD version = MAKELONG(dllversion.info1.dwMinorVersion, dllversion.info1.dwMajorVersion); + DWORD tooltip_v3 = MAKELONG(0, 6); + if (version >= tooltip_v3) + return TTTOOLINFOA_V3_SIZE; + } + } + // Should be fine for XP and onwards, comctl versions >= 4.7 should at least + // be this size. + return TTTOOLINFOA_V2_SIZE; +} + bool GSDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) { return message == WM_COMMAND ? OnCommand((HWND)lParam, LOWORD(wParam), HIWORD(wParam)) : false; @@ -226,3 +267,45 @@ void GSDialog::ComboBoxFixDroppedWidth(UINT id) } } } + +void GSDialog::AddTooltip(UINT id) +{ + static UINT tooltipStructSize = GetTooltipStructSize(); + bool hasTooltip; + + dialog_message(id, &hasTooltip); + if (!hasTooltip) + return; + + HWND hWnd = GetDlgItem(m_hWnd, id); + if (hWnd == NULL) + return; + + // TTS_NOPREFIX allows tabs and '&' to be used. + HWND hwndTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL, + TTS_ALWAYSTIP | TTS_NOPREFIX, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + m_hWnd, NULL, theApp.GetModuleHandle(), NULL); + if (hwndTip == NULL) + return; + + TOOLINFO toolInfo = { 0 }; + toolInfo.cbSize = tooltipStructSize; + toolInfo.hwnd = m_hWnd; + toolInfo.uFlags = TTF_IDISHWND | TTF_SUBCLASS; + toolInfo.uId = (UINT_PTR)hWnd; + // Can't directly add the tooltip string - it doesn't work for long messages + toolInfo.lpszText = LPSTR_TEXTCALLBACK; + SendMessage(hwndTip, TTM_ADDTOOL, 0, (LPARAM)&toolInfo); + // 32.767s is the max show time. + SendMessage(hwndTip, TTM_SETDELAYTIME, TTDT_AUTOPOP, 32767); +} + +void GSDialog::InitCommonControls() +{ + INITCOMMONCONTROLSEX icex; + icex.dwSize = sizeof(INITCOMMONCONTROLSEX); + icex.dwICC = ICC_TAB_CLASSES; + + InitCommonControlsEx(&icex); +} diff --git a/plugins/GSdx/GSDialog.h b/plugins/GSdx/GSDialog.h index 2e5ff499ab..8f2bd86db6 100644 --- a/plugins/GSdx/GSDialog.h +++ b/plugins/GSdx/GSDialog.h @@ -28,6 +28,7 @@ class GSDialog int m_id; static INT_PTR CALLBACK DialogProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); + static UINT GetTooltipStructSize(); protected: HWND m_hWnd; @@ -54,4 +55,8 @@ public: int ComboBoxAppend(UINT id, const char* str, LPARAM data = 0, bool select = false); bool ComboBoxGetSelData(UINT id, INT_PTR& data); void ComboBoxFixDroppedWidth(UINT id); + + void AddTooltip(UINT id); + + static void InitCommonControls(); }; diff --git a/plugins/GSdx/GSLinuxDialog.cpp b/plugins/GSdx/GSLinuxDialog.cpp index 438fb9a867..d7cf1d2df5 100644 --- a/plugins/GSdx/GSLinuxDialog.cpp +++ b/plugins/GSdx/GSLinuxDialog.cpp @@ -314,6 +314,7 @@ void populate_hw_table(GtkWidget* hw_table) AddTooltip(acc_bld_label, acc_bld_combo_box, IDC_ACCURATE_BLEND_UNIT); AddTooltip(tc_depth_check, IDC_TC_DEPTH); AddTooltip(filter_label, filter_combo_box, IDC_FILTER); + AddTooltip(af_label, af_combo_box, IDC_AFCOMBO); s_table_line = 0; InsertWidgetInTable(hw_table, paltex_check, tc_depth_check); @@ -357,6 +358,10 @@ void populate_sw_table(GtkWidget* sw_table) GtkWidget* mipmap_check = CreateCheckBox("Mipmap", "mipmap", true); GtkWidget* spin_thread_check= CreateCheckBox("Disable thread sleeping (6+ cores CPU)", "spin_thread"); + AddTooltip(aa_check, IDC_AA1); + AddTooltip(mipmap_check, IDC_MIPMAP); + AddTooltip(threads_label, threads_spin, IDC_SWTHREADS); + s_table_line = 0; InsertWidgetInTable(sw_table , threads_label , threads_spin); InsertWidgetInTable(sw_table , aa_check, mipmap_check); @@ -384,6 +389,10 @@ void populate_shader_table(GtkWidget* shader_table) GtkWidget* sb_saturation = CreateScale("ShadeBoost_Saturation", 50); GtkWidget* sb_saturation_label = gtk_label_new("Shade Boost Saturation"); + AddTooltip(shadeboost_check, IDC_SHADEBOOST); + AddTooltip(shaderfx_check, IDC_SHADER_FX); + AddTooltip(fxaa_check, IDC_FXAA); + s_table_line = 0; InsertWidgetInTable(shader_table , fxaa_check); InsertWidgetInTable(shader_table , shadeboost_check); diff --git a/plugins/GSdx/GSSetting.cpp b/plugins/GSdx/GSSetting.cpp index 9c802f3ef8..6a901526ef 100644 --- a/plugins/GSdx/GSSetting.cpp +++ b/plugins/GSdx/GSSetting.cpp @@ -31,57 +31,42 @@ const char* dialog_message(int ID, bool* updateText) { switch (ID) { case IDC_FILTER: - return "Control the texture bilinear filtering of the emulation\n\n" - "Nearest or OFF\t: Always disable interpolation, rendering will be blocky.\n" - "----------------------------------------------------------------------------\n" - "PS2 or GRAYED\t: Use same mode as the PS2. It is the more accurate option.\n" - "----------------------------------------------------------------------------\n" - "Forced or ON\t: Always enable interpolation. Rendering is smoother but it could generate some glitches."; + return "Control the texture bilinear filtering of the emulation.\n\n" + "Nearest:\nAlways disable interpolation, rendering will be blocky.\n\n" + "PS2:\nUse same mode as the PS2. It is the more accurate option.\n\n" + "Forced:\nAlways enable interpolation. Rendering is smoother but it could generate some glitches."; case IDC_CRC_LEVEL: return "Control the number of Auto-CRC hacks applied to games.\n\n" - "None\t\t: Remove nearly all CRC hacks (debug only).\n" - "------------------------------------------------------------------\n" - "Minimum\t: Enable a couple of CRC hacks (23).\n" - "------------------------------------------------------------------\n" - "Partial\t\t: Enable most of the CRC hacks.\n\n" - "Recommended setting for OpenGL users.\n" - "Note, may require \'Accurate\' options to be enabled under Hardware Mode Settings.\n" - "------------------------------------------------------------------\n" - "Full\t\t: Enable all CRC hacks.\n\n" - "Recommended setting for DirectX users.\n" - "------------------------------------------------------------------\n" - "Aggressive\t : Use more aggressive CRC hacks.\n\n" - "Only affects a few games, removing some effects which might make the image sharper/clearer.\n\n" + "None:\nRemove nearly all CRC hacks (debug only).\n\n" + "Minimum:\nEnable a couple of CRC hacks (23).\n\n" + "Partial:\nEnable most of the CRC hacks.\nRecommended OpenGL setting (Accurate/depth options may be required).\n\n" + "Full:\nEnable all CRC hacks.\nRecommended Direct3D setting.\n\n" + "Aggressive:\nUse more aggressive CRC hacks. Only affects a few games, removing some effects which might make the image sharper/clearer.\n" "Affected games: FFX, FFX2, FFXII, GOW2, ICO, SoTC, SSX3, SMT3, SMTDDS1, SMTDDS2.\n" "Works as a speedhack for: Steambot Chronicles."; case IDC_SKIPDRAWHACK: case IDC_SKIPDRAWHACKEDIT: - case IDC_STATIC_SKIPDRAW: - return "Skipdraw\n\nSkips drawing n surfaces completely. " + return "Skips drawing n surfaces completely. " "Use it, for example, to try and get rid of bad post processing effects." " Try values between 1 and 100."; case IDC_ALPHAHACK: - return "Alpha Hack\n\nDifferent alpha handling. Can work around some shadow problems.\n\n" - "DX only, OpenGL emulates those effects correctly with accurate options."; + return "Different alpha handling. Can work around some shadow problems."; case IDC_OFFSETHACK: - return "Halfpixel\n\nMight fix some misaligned fog, bloom, or blend effect."; + return "Might fix some misaligned fog, bloom, or blend effect."; case IDC_SPRITEHACK: - return "Sprite Hack\n\nHelps 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." + 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." " Full can be used for Tales of Destiny."; case IDC_WILDHACK: - return "Wild Arms\n\nLowers the GS precision to avoid gaps between pixels when upscaling. Fixes the text on Wild Arms games."; + return "Lowers the GS precision to avoid gaps between pixels when upscaling. Fixes the text on Wild Arms games."; case IDC_MSAACB: - case IDC_STATIC_MSAA: - return "Multisample Anti-Aliasing\n\nEnables hardware Anti-Aliasing. Needs lots of memory." + return "Enables hardware Anti-Aliasing. Needs lots of memory." " The Z-24 modes might need to have LogarithmicZ to compensate for the bits lost (only in DX9 mode).\n\n" - " MSAA is not implemented on the OpenGL renderer"; - + " MSAA is not implemented on the OpenGL renderer."; case IDC_ALPHASTENCIL: return "Extend stencil based emulation of destination alpha to perform stencil operations while drawing.\n\n" "Improves many shadows which are normally overdrawn in parts, may affect other effects.\n" - "Will disable partial transparency in some games or even prevent drawing some elements altogether." - "DX only, OpenGL emulates those effects correctly with accurate options."; + "Will disable partial transparency in some games or even prevent drawing some elements altogether."; case IDC_CHECK_DISABLE_ALL_HACKS: return "FOR TESTING ONLY!!\n\n" "Disable all CRC hacks - will break many games. Overrides CrcHacksExclusion at gsdx.ini\n" @@ -90,44 +75,59 @@ const char* dialog_message(int ID, bool* updateText) { "CrcHacksExclusions=all\n" "CrcHacksExclusions=0x0F0C4A9C, 0x0EE5646B, 0x7ACF7E03"; case IDC_ALIGN_SPRITE: - return "Sprite Alignment Hack\n\n" - "Fixes issues with upscaling(vertical lines) in Namco games like Ace Combat, Tekken, Soul Calibur, etc."; + return "Fixes issues with upscaling(vertical lines) in Namco games like Ace Combat, Tekken, Soul Calibur, etc."; case IDC_ROUND_SPRITE: return "Corrects the sampling of 2D sprite textures when upscaling.\n\n" "Fixes lines in sprites of games like Ar tonelico when upscaling.\n\n" - "Windows: Carries a total of three states: Unchecked (off), Checked (on for all sprites) and Shaded (on for flat sprites)"; + "Half option is for flat sprites, Full is for all sprites."; case IDC_TCOFFSETX: case IDC_TCOFFSETX2: - case IDC_STATIC_TCOFFSETX: case IDC_TCOFFSETY: case IDC_TCOFFSETY2: - case IDC_STATIC_TCOFFSETY: - return "Texture Coordinates Offset Hack\n\n" - "Offset for the ST/UV texture coordinates. Fixes some odd texture issues and might fix some post processing alignment too.\n\n" + return "Offset for the ST/UV texture coordinates. Fixes some odd texture issues and might fix some post processing alignment too.\n\n" " 0500 0500, fixes Persona 3 minimap, helps Haunting Ground.\n" - " 0000 1000, fixes Xenosaga hair edges (DX10+ Issue)\n"; + " 0000 1000, fixes Xenosaga hair edges (DX10+ Issue)"; case IDC_PALTEX: return "When checked 4/8 bits texture will be send to the GPU with a palette. GPU will be in charge of the conversion.\n\n" - "When uncheked the CPU will convert directly the texture to 32 bits\n\n" - "It is a basically a trade-off between GPU/CPU"; + "When unchecked the CPU will convert directly the texture to 32 bits.\n\n" + "It is basically a trade-off between GPU/CPU."; case IDC_ACCURATE_DATE: return "Implement a more accurate algorithm to compute GS destination alpha testing.\n\n" - "It could be slower when the effects are used.\n\nNote: it requires the 4.2 OpenGL extension GL_ARB_shader_image_load_store"; + "It could be slower when the effects are used.\n\nNote: it requires the OpenGL 4.2 extension GL_ARB_shader_image_load_store."; case IDC_ACCURATE_BLEND_UNIT: - return "Control the accuracy level of the GS blending unit emulation. Note: it requires a GL4.5 drivers\n\n" - "None\t: Fast but introduce various rendering issues. It is intended for slow computer.\n" - "------------------------------------------------------------------\n" - "Basic\t: Emulate correctly most of the effects with a limited speed penality. It is the recommended setting.\n" - "------------------------------------------------------------------\n" - "Medium\t: Extend it to all sprites. Performance impact remains reasonable in 3D game.\n" - "------------------------------------------------------------------\n" - "High\t: Extend it to destination alpha blending and color wrapping. (help shadow and fog effect). A good CPU is required\n" - "------------------------------------------------------------------\n" - "Full\t\t: Except few cases, the blending unit will be fully emulated by the shader. It is ultra slow! It is intended for debug\n" - "------------------------------------------------------------------\n" - "Ultra\t: The blending unit will be completely emulated by the shader. It is ultra slow! It is intended for debug\n"; + return "Control the accuracy level of the GS blending unit emulation. Note: it requires OpenGL 4.5 driver support.\n\n" + "None:\nFast but introduce various rendering issues. It is intended for slow computer.\n\n" + "Basic:\nEmulate correctly most of the effects with a limited speed penalty. It is the recommended setting.\n\n" + "Medium:\nExtend it to all sprites. Performance impact remains reasonable in 3D game.\n\n" + "High:\nExtend it to destination alpha blending and color wrapping. (help shadow and fog effect). A good CPU is required.\n\n" + "Full:\nExcept few cases, the blending unit will be fully emulated by the shader. It is ultra slow! It is intended for debug.\n\n" + "Ultra:\nThe blending unit will be completely emulated by the shader. It is ultra slow! It is intended for debug."; case IDC_TC_DEPTH: return "Allows the conversion of Depth buffer from/to Color buffer. It is used for blur & depth of field effects"; + case IDC_AFCOMBO: + return "Reduces texture aliasing at extreme viewing angles. High performance impact."; + case IDC_AA1: + return "Internal GS feature. Reduces edge aliasing of lines and triangles when the game requests it."; + case IDC_SWTHREADS: + case IDC_SWTHREADS_EDIT: + return "Increases number of threads used for rendering. Optimal setting depends on CPU."; + case IDC_SHADEBOOST: + return "Allows brightness, contrast and saturation to be manually adjusted."; + case IDC_SHADER_FX: + return "Enables external shader for additional post-processing effects."; + case IDC_FXAA: + return "Enables fast approximate anti-aliasing. Small performance impact."; +#ifdef _WIN32 + // DX9 only + case IDC_FBA: + 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."; +#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/GSSetting.h b/plugins/GSdx/GSSetting.h index 9c858e9cb0..86673b0d74 100644 --- a/plugins/GSdx/GSSetting.h +++ b/plugins/GSdx/GSSetting.h @@ -45,27 +45,31 @@ enum { IDC_FILTER, IDC_SKIPDRAWHACK, IDC_SKIPDRAWHACKEDIT, - IDC_STATIC_SKIPDRAW, IDC_ALPHAHACK, IDC_OFFSETHACK, IDC_SPRITEHACK, IDC_WILDHACK, IDC_MSAACB, - IDC_STATIC_MSAA, IDC_ALPHASTENCIL, IDC_CHECK_DISABLE_ALL_HACKS, IDC_ALIGN_SPRITE, IDC_ROUND_SPRITE, IDC_TCOFFSETX, IDC_TCOFFSETX2, - IDC_STATIC_TCOFFSETX, IDC_TCOFFSETY, IDC_TCOFFSETY2, - IDC_STATIC_TCOFFSETY, IDC_PALTEX, IDC_ACCURATE_BLEND_UNIT, IDC_ACCURATE_DATE, IDC_TC_DEPTH, - IDC_CRC_LEVEL + IDC_CRC_LEVEL, + IDC_AFCOMBO, + IDC_AA1, + IDC_SWTHREADS, + IDC_SWTHREADS_EDIT, + IDC_SHADEBOOST, + IDC_SHADER_FX, + IDC_FXAA, + IDC_MIPMAP }; #endif diff --git a/plugins/GSdx/GSSettingsDlg.cpp b/plugins/GSdx/GSSettingsDlg.cpp index ff81a74316..94eb4d0d2a 100644 --- a/plugins/GSdx/GSSettingsDlg.cpp +++ b/plugins/GSdx/GSSettingsDlg.cpp @@ -147,14 +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)); @@ -162,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)); @@ -175,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)); @@ -183,10 +181,25 @@ 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)); + AddTooltip(IDC_FILTER); + AddTooltip(IDC_CRC_LEVEL); + AddTooltip(IDC_PALTEX); + AddTooltip(IDC_ACCURATE_DATE); + AddTooltip(IDC_ACCURATE_BLEND_UNIT); + AddTooltip(IDC_TC_DEPTH); + AddTooltip(IDC_AFCOMBO); + AddTooltip(IDC_AA1); + AddTooltip(IDC_SWTHREADS); + AddTooltip(IDC_SWTHREADS_EDIT); + AddTooltip(IDC_SHADEBOOST); + AddTooltip(IDC_SHADER_FX); + AddTooltip(IDC_FXAA); + AddTooltip(IDC_FBA); + AddTooltip(IDC_LOGZ); + UpdateControls(); } @@ -203,12 +216,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) @@ -256,18 +269,27 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code) { theApp.SetConfig("upscale_multiplier", 1); } - - if(ComboBoxGetSelData(IDC_ACCURATE_BLEND_UNIT, data)) - { - theApp.SetConfig("accurate_blending_unit", (int)data); - } - + + if (ComboBoxGetSelData(IDC_FILTER, data)) + { + theApp.SetConfig("filter", (int)data); + } + + if(ComboBoxGetSelData(IDC_ACCURATE_BLEND_UNIT, data)) + { + theApp.SetConfig("accurate_blending_unit", (int)data); + } + + if (ComboBoxGetSelData(IDC_CRC_LEVEL, data)) + { + theApp.SetConfig("crc_hack_level", (int)data); + } + if(ComboBoxGetSelData(IDC_AFCOMBO, data)) { 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)); @@ -278,10 +300,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)); @@ -367,8 +386,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); @@ -379,9 +408,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); @@ -395,7 +432,7 @@ void GSSettingsDlg::UpdateControls() // Hacks EnableWindow(GetDlgItem(m_hWnd, IDC_HACKS_ENABLED), hw); - EnableWindow(GetDlgItem(m_hWnd, IDC_HACKSBUTTON), hw /*&& IsDlgButtonChecked(m_hWnd, IDC_HACKS_ENABLED) == BST_CHECKED*/); + EnableWindow(GetDlgItem(m_hWnd, IDC_HACKSBUTTON), hw && IsDlgButtonChecked(m_hWnd, IDC_HACKS_ENABLED)); } } @@ -512,19 +549,15 @@ GSHacksDlg::GSHacksDlg() : memset(msaa2cb, 0, sizeof(msaa2cb)); memset(cb2msaa, 0, sizeof(cb2msaa)); } -int swap_states(int a) -{ - switch(a) - { - case 0: return 0; - case 1: return 2; - case 2: return 1; - default: return 0; // If user's set more than 2 in ini file, set variable to 0. - } -} + void GSHacksDlg::OnInit() -{ - bool dx9 = (int)SendMessage(GetDlgItem(GetParent(m_hWnd), IDC_RENDERER), CB_GETCURSEL, 0, 0) / 3 == 0; +{ + HWND hwnd_renderer = GetDlgItem(GetParent(m_hWnd), IDC_RENDERER); + int renderer = SendMessage(hwnd_renderer, CB_GETITEMDATA, SendMessage(hwnd_renderer, CB_GETCURSEL, 0, 0), 0); + // It can only be accessed with a HW renderer, so this is sufficient. + bool dx9 = renderer == 0; + bool dx11 = renderer == 3; + bool ogl = renderer == 12; unsigned short cb = 0; if(dx9) for(unsigned short i = 0; i < 17; i++) @@ -559,21 +592,15 @@ void GSHacksDlg::OnInit() SendMessage(GetDlgItem(m_hWnd, IDC_MSAACB), CB_SETCURSEL, msaa2cb[min(theApp.GetConfig("UserHacks_MSAA", 0), 16)], 0); - char crctext[5][32] = { "None", "Minimal", "Partial", "Full", "Agressive" }; - for (unsigned short i = 0; i < 5; i++){ - SendMessage(GetDlgItem(m_hWnd, IDC_CRC_LEVEL), CB_ADDSTRING, 0, (LPARAM)crctext[i]); - } - - SendMessage(GetDlgItem(m_hWnd, IDC_CRC_LEVEL), CB_SETCURSEL, theApp.GetConfig("crc_hack_level", 3), 0); - CheckDlgButton(m_hWnd, IDC_ALPHAHACK, theApp.GetConfig("UserHacks_AlphaHack", 0)); CheckDlgButton(m_hWnd, IDC_OFFSETHACK, theApp.GetConfig("UserHacks_HalfPixelOffset", 0)); - CheckDlgButton(m_hWnd, IDC_SPRITEHACK, theApp.GetConfig("UserHacks_SpriteHack", 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_ROUND_SPRITE, swap_states(theApp.GetConfig("UserHacks_round_sprite_offset", 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)); + ComboBoxInit(IDC_SPRITEHACK, theApp.m_gs_hack, theApp.GetConfig("UserHacks_SpriteHack", 0)); + SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETRANGE, 0, MAKELPARAM(1000, 0)); SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("UserHacks_SkipDraw", 0), 0)); @@ -583,8 +610,23 @@ void GSHacksDlg::OnInit() SendMessage(GetDlgItem(m_hWnd, IDC_TCOFFSETY), UDM_SETRANGE, 0, MAKELPARAM(10000, 0)); SendMessage(GetDlgItem(m_hWnd, IDC_TCOFFSETY), UDM_SETPOS, 0, MAKELPARAM((theApp.GetConfig("UserHacks_TCOffset", 0) >> 16) & 0xFFFF, 0)); - // Hacks descriptions - SetWindowText(GetDlgItem(m_hWnd, IDC_HACK_DESCRIPTION), "Hover over an item to get a description."); + ShowWindow(GetDlgItem(m_hWnd, IDC_ALPHASTENCIL), ogl ? SW_HIDE : SW_SHOW); + ShowWindow(GetDlgItem(m_hWnd, IDC_ALPHAHACK), ogl ? SW_HIDE : SW_SHOW); + + AddTooltip(IDC_SKIPDRAWHACKEDIT); + AddTooltip(IDC_SKIPDRAWHACK); + AddTooltip(IDC_ALPHAHACK); + AddTooltip(IDC_OFFSETHACK); + AddTooltip(IDC_SPRITEHACK); + AddTooltip(IDC_WILDHACK); + AddTooltip(IDC_MSAACB); + AddTooltip(IDC_ALPHASTENCIL); + AddTooltip(IDC_ALIGN_SPRITE); + AddTooltip(IDC_ROUND_SPRITE); + AddTooltip(IDC_TCOFFSETX); + AddTooltip(IDC_TCOFFSETX2); + AddTooltip(IDC_TCOFFSETY); + AddTooltip(IDC_TCOFFSETY2); } void GSHacksDlg::UpdateControls() @@ -594,28 +636,6 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) { switch(message) { - case WM_SETCURSOR: - { - bool updateText = true; - - POINT pos; - GetCursorPos(&pos); - ScreenToClient(m_hWnd, &pos); - - HWND hoveredwnd = ChildWindowFromPointEx(m_hWnd, pos, CWP_SKIPINVISIBLE | CWP_SKIPTRANSPARENT); - - if (hoveredwnd != hovered_window) - hovered_window = hoveredwnd; - else - break; - - const char *helpstr = dialog_message(GetDlgCtrlID(hoveredwnd), &updateText); - - if(updateText) - SetWindowText(GetDlgItem(m_hWnd, IDC_HACK_DESCRIPTION), helpstr); - - } break; - case WM_COMMAND: { int id = LOWORD(wParam); @@ -624,15 +644,21 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) { case IDOK: { + INT_PTR data; + if (ComboBoxGetSelData(IDC_ROUND_SPRITE, data)) + { + theApp.SetConfig("UserHacks_round_sprite_offset", (int)data); + } + if (ComboBoxGetSelData(IDC_SPRITEHACK, data)) + { + theApp.SetConfig("UserHacks_SpriteHack", (int)data); + } theApp.SetConfig("UserHacks_MSAA", cb2msaa[(int)SendMessage(GetDlgItem(m_hWnd, IDC_MSAACB), CB_GETCURSEL, 0, 0)]); - theApp.SetConfig("crc_hack_level", (int)SendMessage(GetDlgItem(m_hWnd, IDC_CRC_LEVEL), 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_SpriteHack", (int)IsDlgButtonChecked(m_hWnd, IDC_SPRITEHACK)); 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("UserHacks_round_sprite_offset", swap_states((int)IsDlgButtonChecked(m_hWnd, IDC_ROUND_SPRITE))); 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/GSSettingsDlg.h b/plugins/GSdx/GSSettingsDlg.h index 2e7b8ddd69..1348341dee 100644 --- a/plugins/GSdx/GSSettingsDlg.h +++ b/plugins/GSdx/GSSettingsDlg.h @@ -48,8 +48,6 @@ class GSHacksDlg : public GSDialog bool isdx9; - HWND hovered_window; - void UpdateControls(); protected: diff --git a/plugins/GSdx/GSdx.cpp b/plugins/GSdx/GSdx.cpp index 6bb587753b..6bdf6e4c79 100644 --- a/plugins/GSdx/GSdx.cpp +++ b/plugins/GSdx/GSdx.cpp @@ -177,12 +177,12 @@ GSdxApp::GSdxApp() m_gs_gl_ext.push_back(GSSetting(1, "Force-Enabled", "")); m_gs_hack.push_back(GSSetting(0, "Off", "")); - m_gs_hack.push_back(GSSetting(1, "Halfly On", "")); - m_gs_hack.push_back(GSSetting(2, "Fully On", "")); + m_gs_hack.push_back(GSSetting(1, "Half", "")); + m_gs_hack.push_back(GSSetting(2, "Full", "")); m_gs_crc_level.push_back(GSSetting(0 , "None", "Debug")); m_gs_crc_level.push_back(GSSetting(1 , "Minimum", "Debug")); - m_gs_crc_level.push_back(GSSetting(2 , "Partial", "openGL recommended")); + m_gs_crc_level.push_back(GSSetting(2 , "Partial", "OpenGL Recommended")); m_gs_crc_level.push_back(GSSetting(3 , "Full", "Safest")); m_gs_crc_level.push_back(GSSetting(4 , "Aggressive", "")); diff --git a/plugins/GSdx/GSdx.rc b/plugins/GSdx/GSdx.rc index 2d0a7c5475..6e71c32fb0 100644 --- a/plugins/GSdx/GSdx.rc +++ b/plugins/GSdx/GSdx.rc @@ -89,36 +89,33 @@ IDB_LOGOGL BITMAP "res\\logo-ogl.bmp" // Dialog // -IDD_HACKS DIALOGEX 0, 0, 315, 294 +IDD_HACKS DIALOGEX 0, 0, 147, 182 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,258,273,50,14 - GROUPBOX "Hack",IDC_STATIC,7,7,86,262,0,WS_EX_TRANSPARENT - GROUPBOX "Description",IDC_STATIC,96,7,212,262 - LTEXT "MSAA",IDC_STATIC_MSAA,14,20,20,8 - LTEXT "Skipdraw",IDC_STATIC_SKIPDRAW,14,37,30,8 - EDITTEXT IDC_SKIPDRAWHACKEDIT,53,35,35,14,ES_RIGHT | ES_AUTOHSCROLL - CONTROL "",IDC_SKIPDRAWHACK,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,88,35,10,14 - CONTROL "Alpha",IDC_ALPHAHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,85,34,10 - CONTROL "Half-pixel Offset",IDC_OFFSETHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,101,65,10 - CONTROL "Sprite",IDC_SPRITEHACK,"Button",BS_AUTO3STATE | WS_TABSTOP,14,117,35,10 - LTEXT "USE AT YOUR OWN RISK!",IDC_STATIC,7,276,84,11,WS_DISABLED - COMBOBOX IDC_MSAACB,35,18,54,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "Wild Arms Offset",IDC_WILDHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,134,64,10 - LTEXT "TEXT_GOES_HERE",IDC_HACK_DESCRIPTION,102,20,199,192 - CONTROL "Alpha Stencil",IDC_ALPHASTENCIL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,151,66,10 - CONTROL "Round Sprite",IDC_ROUND_SPRITE,"Button",BS_AUTO3STATE | WS_TABSTOP,14,168,66,8 - CONTROL "Align Sprite",IDC_ALIGN_SPRITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,186,60,10 - LTEXT "TC Offset X",IDC_STATIC_TCOFFSETX,14,204,37,8 - EDITTEXT IDC_TCOFFSETX2,53,202,35,14,ES_RIGHT | ES_AUTOHSCROLL - CONTROL "",IDC_TCOFFSETX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,86,202,11,14 - EDITTEXT IDC_TCOFFSETY2,53,219,35,14,ES_RIGHT | ES_AUTOHSCROLL - CONTROL "",IDC_TCOFFSETY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,86,219,11,14 - LTEXT "TC Offset Y",IDC_STATIC_TCOFFSETY,14,221,37,8 - COMBOBOX IDC_CRC_LEVEL,13,65,75,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "CRC Hack Level",IDC_STATIC,14,54,51,8 + DEFPUSHBUTTON "OK",IDOK,84,163,56,14 + GROUPBOX "USE AT YOUR OWN RISK!",IDC_STATIC,7,7,133,155,0,WS_EX_TRANSPARENT + 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 + 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,84,64,34,8 + CONTROL "Half-pixel Offset",IDC_OFFSETHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,51,65,8 + COMBOBOX IDC_MSAACB,84,17,48,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + 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 END IDD_SHADEBOOST DIALOGEX 0, 0, 316, 129 @@ -184,57 +181,59 @@ BEGIN CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,157,49,10 END - -IDD_CONFIG DIALOGEX 0, 0, 187, 402 +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,378,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,335,80,8 - EDITTEXT IDC_SWTHREADS_EDIT,94,333,35,13,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,129,324,11,14 - COMBOBOX IDC_UPSCALE_MULTIPLIER,92,146,74,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Or use Scaling:",IDC_STATIC,38,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,351,93,10 - PUSHBUTTON "Cancel",IDCANCEL,95,378,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,322,175,50,BS_CENTER - GROUPBOX "Hardware Mode Settings",IDC_STATIC,6,214,175,108,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,76,10 + 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 @@ -249,9 +248,16 @@ BEGIN IDD_HACKS, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 308 + RIGHTMARGIN, 140 + VERTGUIDE, 14 + VERTGUIDE, 80 + VERTGUIDE, 84 + VERTGUIDE, 132 TOPMARGIN, 7 - BOTTOMMARGIN, 239 + BOTTOMMARGIN, 177 + HORZGUIDE, 51 + HORZGUIDE, 64 + HORZGUIDE, 77 END IDD_SHADEBOOST, DIALOG @@ -283,15 +289,17 @@ BEGIN IDD_CONFIG, DIALOG BEGIN LEFTMARGIN, 6 - RIGHTMARGIN, 181 + RIGHTMARGIN, 179 VERTGUIDE, 11 - VERTGUIDE, 87 + VERTGUIDE, 90 + VERTGUIDE, 94 + VERTGUIDE, 175 TOPMARGIN, 6 - BOTTOMMARGIN, 360 - HORZGUIDE, 285 + BOTTOMMARGIN, 385 + HORZGUIDE, 194 + HORZGUIDE, 297 END END - #endif // APSTUDIO_INVOKED diff --git a/plugins/GSdx/resource.h b/plugins/GSdx/resource.h index af1aacbf0b..a73f911891 100644 --- a/plugins/GSdx/resource.h +++ b/plugins/GSdx/resource.h @@ -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 @@ -55,20 +57,16 @@ #define IDC_MSAACB 2070 #define IDC_HACKSBUTTON 2071 #define IDC_WILDHACK 2072 -#define IDC_HACK_DESCRIPTION 2073 -#define IDC_STATIC_MSAA 2074 -#define IDC_STATIC_SKIPDRAW 2075 #define IDC_CHECK_DISABLE_ALL_HACKS 2076 #define IDC_ALPHASTENCIL 2077 #define IDC_ADAPTER 2078 -#define IDC_STATIC_TCOFFSETX 2079 -#define IDC_STATIC_TCOFFSETY 2080 #define IDC_TCOFFSETX 2081 #define IDC_TCOFFSETX2 2082 #define IDC_TCOFFSETY 2083 #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 +74,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 diff --git a/plugins/GSdx/vsprops/common.props b/plugins/GSdx/vsprops/common.props index 388a3c5879..bd7c502a80 100644 --- a/plugins/GSdx/vsprops/common.props +++ b/plugins/GSdx/vsprops/common.props @@ -8,7 +8,7 @@ true - _WINDOWS;_WIN32_WINNT=0x500;%(PreprocessorDefinitions) + _WINDOWS;_WIN32_WINNT=0x501;%(PreprocessorDefinitions) Fast false Level4 @@ -18,7 +18,7 @@ true - d3d11.lib;d3dx11.lib;d3d10_1.lib;d3dx10.lib;d3d9.lib;d3dx9.lib;dxgi.lib;dxguid.lib;winmm.lib;strmiids.lib;xinput.lib;opengl32.lib;opencl.lib;comsuppw.lib;%(AdditionalDependencies) + d3d11.lib;d3dx11.lib;d3d10_1.lib;d3dx10.lib;d3d9.lib;d3dx9.lib;dxgi.lib;dxguid.lib;winmm.lib;strmiids.lib;xinput.lib;opengl32.lib;opencl.lib;comsuppw.lib;comctl32.lib;%(AdditionalDependencies) d3d9.dll;d3dx9_43.dll;d3d11.dll;d3dx11_43.dll;dxgi.dll;opengl32.dll;%(DelayLoadDLLs) true Windows