gsdx:windows: Update GUI to reflect recent changes

"Enable Hardware Depth" removed from main dialog.
"Disable Depth Emulation" and "Fast Texture Invalidation" added to Hacks
dialog.

And fix lots of whitespace issues.
This commit is contained in:
Jonathan Li 2016-05-02 00:00:00 +01:00
parent 9b58b3fb6e
commit 6430e41fb5
4 changed files with 63 additions and 51 deletions

View File

@ -133,11 +133,9 @@ const char* dialog_message(int ID, bool* updateText) {
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.";
case IDC_MIPMAP:
return "Enables mipmapping, which some games require to render correctly. Turn off only for debug purposes.";
#ifdef __linux__
case IDC_FAST_TC_INV:
return "By default, the texture cache handles partial invalidations. Unfortunately it is very costly to compute CPU wise."
"\n\nThis hack replaces the partial invalidation with a complete deletion of the texture to reduce the CPU load.\n\nIt helps snowblind engine game.";
#endif
default:
if (updateText)
*updateText = false;

View File

@ -30,8 +30,8 @@
GSSettingsDlg::GSSettingsDlg()
: GSDialog(IDD_CONFIG)
: GSDialog(IDD_CONFIG)
{
#ifdef ENABLE_OPENCL
list<OCLDeviceDesc> ocldevs;
@ -61,7 +61,7 @@ void GSSettingsDlg::OnInit()
{
CreateDXGIFactory1(__uuidof(IDXGIFactory1), (void**)&dxgi_factory);
}
adapters.clear();
adapters.clear();
adapters.push_back(Adapter("Default Hardware Device", "default", GSUtil::CheckDirect3D11Level(NULL, D3D_DRIVER_TYPE_HARDWARE)));
adapters.push_back(Adapter("Reference Device", "ref", GSUtil::CheckDirect3D11Level(NULL, D3D_DRIVER_TYPE_REFERENCE)));
@ -75,9 +75,9 @@ void GSSettingsDlg::OnInit()
break;
DXGI_ADAPTER_DESC1 desc;
HRESULT hr = adapter->GetDesc1(&desc);
if(S_OK == hr)
{
D3D_FEATURE_LEVEL level = GSUtil::CheckDirect3D11Level(adapter, D3D_DRIVER_TYPE_UNKNOWN);
@ -160,7 +160,6 @@ void GSSettingsDlg::OnInit()
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));
// Hacks
CheckDlgButton(m_hWnd, IDC_HACKS_ENABLED, theApp.GetConfig("UserHacks", 0));
@ -179,7 +178,6 @@ void GSSettingsDlg::OnInit()
AddTooltip(IDC_PALTEX);
AddTooltip(IDC_ACCURATE_DATE);
AddTooltip(IDC_ACCURATE_BLEND_UNIT);
AddTooltip(IDC_TC_DEPTH);
AddTooltip(IDC_AFCOMBO);
AddTooltip(IDC_AA1);
AddTooltip(IDC_MIPMAP);
@ -285,7 +283,6 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
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));
theApp.SetConfig("accurate_date", (int)IsDlgButtonChecked(m_hWnd, IDC_ACCURATE_DATE));
theApp.SetConfig("texture_cache_depth", (int)IsDlgButtonChecked(m_hWnd, IDC_TC_DEPTH));
theApp.SetConfig("UserHacks", (int)IsDlgButtonChecked(m_hWnd, IDC_HACKS_ENABLED));
}
break;
@ -413,8 +410,7 @@ void GSSettingsDlg::UpdateControls()
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);
// Software mode settings
EnableWindow(GetDlgItem(m_hWnd, IDC_AA1), sw);
EnableWindow(GetDlgItem(m_hWnd, IDC_MIPMAP), sw);
@ -501,32 +497,32 @@ bool GSShaderDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_HSCROLL:
{
case WM_HSCROLL:
{
if((HWND)lParam == GetDlgItem(m_hWnd, IDC_SATURATION_SLIDER))
{
{
char text[8] = {0};
saturation = SendMessage(GetDlgItem(m_hWnd, IDC_SATURATION_SLIDER),TBM_GETPOS,0,0);
saturation = SendMessage(GetDlgItem(m_hWnd, IDC_SATURATION_SLIDER),TBM_GETPOS,0,0);
sprintf(text, "%d", saturation);
SetDlgItemText(m_hWnd, IDC_SATURATION_TEXT, text);
}
else if((HWND)lParam == GetDlgItem(m_hWnd, IDC_BRIGHTNESS_SLIDER))
{
{
char text[8] = {0};
brightness = SendMessage(GetDlgItem(m_hWnd, IDC_BRIGHTNESS_SLIDER),TBM_GETPOS,0,0);
brightness = SendMessage(GetDlgItem(m_hWnd, IDC_BRIGHTNESS_SLIDER),TBM_GETPOS,0,0);
sprintf(text, "%d", brightness);
SetDlgItemText(m_hWnd, IDC_BRIGHTNESS_TEXT, text);
}
else if((HWND)lParam == GetDlgItem(m_hWnd, IDC_CONTRAST_SLIDER))
{
{
char text[8] = {0};
contrast = SendMessage(GetDlgItem(m_hWnd, IDC_CONTRAST_SLIDER),TBM_GETPOS,0,0);
sprintf(text, "%d", contrast);
SetDlgItemText(m_hWnd, IDC_CONTRAST_TEXT, text);
}
@ -571,7 +567,7 @@ bool GSShaderDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
theApp.SetConfig("shaderfx_conf", buffer);
delete[] buffer;
EndDialog(m_hWnd, id);
EndDialog(m_hWnd, id);
} break;
case IDC_SHADEBOOST:
UpdateControls();
@ -608,7 +604,7 @@ bool GSShaderDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
// Hacks Dialog
GSHacksDlg::GSHacksDlg() :
GSHacksDlg::GSHacksDlg() :
GSDialog(IDD_HACKS)
{
memset(msaa2cb, 0, sizeof(msaa2cb));
@ -648,10 +644,10 @@ void GSHacksDlg::OnInit()
else for(unsigned short j = 0; j < 5; j++) // TODO: Make the same kind of check for d3d11, eventually....
{
unsigned short i = j == 0 ? 0 : 1 << j;
msaa2cb[i] = j;
cb2msaa[j] = i;
char text[32] = {0};
sprintf(text, "%dx ", i);
@ -667,7 +663,8 @@ void GSHacksDlg::OnInit()
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));
CheckDlgButton(m_hWnd, IDC_SAFE_FBMASK, theApp.GetConfig("UserHacks_safe_fbmask", 0));
CheckDlgButton(m_hWnd, IDC_TC_DEPTH, theApp.GetConfig("UserHacks_DisableDepthSupport", 0));
CheckDlgButton(m_hWnd, IDC_FAST_TC_INV, theApp.GetConfig("UserHacks_DisablePartialInvalidation", 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));
@ -710,13 +707,15 @@ void GSHacksDlg::OnInit()
AddTooltip(IDC_TCOFFSETY2);
AddTooltip(IDC_PRELOAD_GS);
AddTooltip(IDC_SAFE_FBMASK);
AddTooltip(IDC_TC_DEPTH);
AddTooltip(IDC_FAST_TC_INV);
}
void GSHacksDlg::UpdateControls()
{}
bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
{
{
switch(message)
{
case WM_COMMAND:
@ -745,7 +744,8 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
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));
theApp.SetConfig("UserHacks_safe_fbmask", (int)IsDlgButtonChecked(m_hWnd, IDC_SAFE_FBMASK));
theApp.SetConfig("UserHacks_DisableDepthSupport", (int)IsDlgButtonChecked(m_hWnd, IDC_TC_DEPTH));
theApp.SetConfig("UserHacks_DisablePartialInvalidation", (int)IsDlgButtonChecked(m_hWnd, IDC_FAST_TC_INV));
unsigned int TCOFFSET = SendMessage(GetDlgItem(m_hWnd, IDC_TCOFFSETX), UDM_GETPOS, 0, 0) & 0xFFFF;
TCOFFSET |= (SendMessage(GetDlgItem(m_hWnd, IDC_TCOFFSETY), UDM_GETPOS, 0, 0) & 0xFFFF) << 16;

View File

@ -67,44 +67,57 @@ END
//
IDR_TFX_FX RCDATA "res\\tfx.fx"
IDR_CONVERT_FX RCDATA "res\\convert.fx"
IDR_INTERLACE_FX RCDATA "res\\interlace.fx"
IDR_MERGE_FX RCDATA "res\\merge.fx"
IDR_FXAA_FX RCDATA "res\\fxaa.fx"
IDR_CS_FX RCDATA "res\\cs.fx"
IDR_SHADEBOOST_FX RCDATA "res\\shadeboost.fx"
IDR_TFX_CL RCDATA "res\\tfx.cl"
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
// GSDX logos for PCSX2
IDB_LOGO9 BITMAP "res\\logo9.bmp"
IDB_LOGO10 BITMAP "res\\logo10.bmp"
IDB_LOGO11 BITMAP "res\\logo11.bmp"
IDB_LOGOGL BITMAP "res\\logo-ogl.bmp"
IDB_NULL BITMAP "res\\logo-null.bmp"
// GSDX logos for PS1 Emulators
IDB_PSX_LOGO9 BITMAP "res\\psx-logo9.bmp"
IDB_PSX_LOGO11 BITMAP "res\\psx-logo11.bmp"
IDB_PSX_NULL BITMAP "res\\psx-logo-null.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_HACKS DIALOGEX 0, 0, 161, 200
IDD_HACKS DIALOGEX 0, 0, 161, 222
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,88,181,66,14
GROUPBOX "USE AT YOUR OWN RISK!",IDC_STATIC,7,7,147,171,0,WS_EX_TRANSPARENT
CONTROL "Preload Data Frame",IDC_PRELOAD_GS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,95,80,8
DEFPUSHBUTTON "OK",IDOK,89,201,57,14
GROUPBOX "USE AT YOUR OWN RISK!",IDC_STATIC,7,7,147,193,0,WS_EX_TRANSPARENT
CONTROL "Preload Data Frame",IDC_PRELOAD_GS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,115,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
@ -113,19 +126,21 @@ BEGIN
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 "Safe accurate blending",IDC_SAFE_FBMASK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,77,90,8
CONTROL "Safe Accurate Blending",IDC_SAFE_FBMASK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,77,90,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,88,51,58,8
RTEXT "TC Offset X:",IDC_STATIC,40,146,44,8
EDITTEXT IDC_TCOFFSETX2,88,144,58,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_TCOFFSETX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,135,145,11,14
EDITTEXT IDC_TCOFFSETY2,88,162,58,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_TCOFFSETY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,135,162,11,14
RTEXT "TC Offset Y:",IDC_STATIC,36,165,48,8
COMBOBOX IDC_ROUND_SPRITE,88,109,58,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Round Sprite:",IDC_ROUND_SPRITE_TEXT,39,111,45,8
RTEXT "Sprite:",IDC_SPRITEHACK_TEXT,62,127,22,8
COMBOBOX IDC_SPRITEHACK,88,125,58,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Disable Depth Emulation",IDC_TC_DEPTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,90,92,8
RTEXT "TC Offset X:",IDC_STATIC,40,166,44,8
EDITTEXT IDC_TCOFFSETX2,88,163,58,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_TCOFFSETX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,135,161,11,14
EDITTEXT IDC_TCOFFSETY2,88,181,58,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_TCOFFSETY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,135,179,11,14
COMBOBOX IDC_ROUND_SPRITE,88,128,58,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Round Sprite:",IDC_ROUND_SPRITE_TEXT,39,131,45,8
RTEXT "Sprite:",IDC_SPRITEHACK_TEXT,62,147,22,8
COMBOBOX IDC_SPRITEHACK,88,145,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
RTEXT "TC Offset Y:",IDC_STATIC,40,184,44,8
END
IDD_SHADER DIALOGEX 0, 0, 248, 250
@ -239,8 +254,7 @@ BEGIN
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
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
CONTROL "Accurate Date",IDC_ACCURATE_DATE,"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
@ -275,7 +289,7 @@ BEGIN
VERTGUIDE, 88
VERTGUIDE, 146
TOPMARGIN, 7
BOTTOMMARGIN, 177
BOTTOMMARGIN, 216
HORZGUIDE, 51
HORZGUIDE, 64
HORZGUIDE, 77

View File

@ -2,7 +2,6 @@
// Microsoft Visual C++ generated include file.
// Used by GSdx.rc
//
#define IDC_PALTEX 2001
#define IDC_LOGZ 2002
#define IDC_CODECS 2003
@ -103,6 +102,7 @@
#define IDC_PRELOAD_GS 2098
#define IDC_TVSHADER 2099
#define IDC_SAFE_FBMASK 2100
#define IDC_FAST_TC_INV 2101
#define IDR_CONVERT_FX 10000
#define IDR_TFX_FX 10001
#define IDR_MERGE_FX 10002
@ -121,7 +121,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 10013
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 2101
#define _APS_NEXT_CONTROL_VALUE 2102
#define _APS_NEXT_SYMED_VALUE 5000
#endif
#endif