remove is_gsopen stuffs since old GUI is deprecated.

This commit is contained in:
Akash 2015-07-13 11:11:48 +05:30
parent 854403af81
commit 7c4f3d28ce
6 changed files with 29 additions and 157 deletions

View File

@ -69,9 +69,6 @@ static bool s_exclusive = true;
static const char *s_renderer_name = "";
static const char *s_renderer_type = "";
static const char *s_type_log ="";
#ifdef _WINDOWS
static bool s_isgsopen2 = false; // boolean to remove some stuff from the config panel in new PCSX2's/
#endif
bool gsopen_done = false; // crash guard for GSgetTitleInfo2 and GSKeyEvent (replace with lock?)
EXPORT_C_(uint32) PS2EgetLibType()
@ -92,15 +89,6 @@ EXPORT_C_(uint32) PS2EgetLibVersion2(uint32 type)
return (build << 0) | (revision << 8) | (PS2E_GS_VERSION << 16) | (PLUGIN_VERSION << 24);
}
#ifdef _WINDOWS
EXPORT_C_(void) PS2EsetEmuVersion(const char* emuId, uint32 version)
{
s_isgsopen2 = true;
}
#endif
EXPORT_C_(uint32) PS2EgetCpuPlatform()
{
#ifdef _M_AMD64
@ -775,7 +763,7 @@ EXPORT_C GSconfigure()
#ifdef _WINDOWS
if(GSSettingsDlg(s_isgsopen2).DoModal() == IDOK)
if(GSSettingsDlg().DoModal() == IDOK)
{
if(s_gs != NULL && s_gs->m_wnd->IsManaged())
{

View File

@ -28,9 +28,10 @@
#include "resource.h"
#include "GSSetting.h"
GSSettingsDlg::GSSettingsDlg(bool isOpen2)
: GSDialog(isOpen2 ? IDD_CONFIG2 : IDD_CONFIG)
, m_IsOpen2(isOpen2)
GSSettingsDlg::GSSettingsDlg()
: GSDialog(IDD_CONFIG)
{
#ifdef ENABLE_OPENCL
list<OCLDeviceDesc> ocldevs;
@ -50,8 +51,6 @@ void GSSettingsDlg::OnInit()
{
__super::OnInit();
m_modes.clear();
CComPtr<IDirect3D9> d3d9;
d3d9.Attach(Direct3DCreate9(D3D_SDK_VERSION));
@ -62,39 +61,7 @@ void GSSettingsDlg::OnInit()
{
CreateDXGIFactory1(__uuidof(IDXGIFactory1), (void**)&dxgi_factory);
}
if(!m_IsOpen2)
{
D3DDISPLAYMODE mode;
memset(&mode, 0, sizeof(mode));
m_modes.push_back(mode);
ComboBoxAppend(IDC_RESOLUTION, "Please select...", (LPARAM)&m_modes.back(), true);
if(d3d9)
{
uint32 w = theApp.GetConfig("ModeWidth", 0);
uint32 h = theApp.GetConfig("ModeHeight", 0);
uint32 hz = theApp.GetConfig("ModeRefreshRate", 0);
uint32 n = d3d9->GetAdapterModeCount(D3DADAPTER_DEFAULT, D3DFMT_R5G6B5);
for(uint32 i = 0; i < n; i++)
{
if(S_OK == d3d9->EnumAdapterModes(D3DADAPTER_DEFAULT, D3DFMT_R5G6B5, i, &mode))
{
m_modes.push_back(mode);
string str = format("%dx%d %dHz", mode.Width, mode.Height, mode.RefreshRate);
ComboBoxAppend(IDC_RESOLUTION, str.c_str(), (LPARAM)&m_modes.back(), w == mode.Width && h == mode.Height && hz == mode.RefreshRate);
}
}
}
}
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)));
@ -182,11 +149,9 @@ void GSSettingsDlg::OnInit()
UpdateRenderers();
ComboBoxInit(IDC_INTERLACE, theApp.m_gs_interlace, theApp.GetConfig("Interlace", 7)); // 7 = "auto", detects interlace based on SMODE2 register
ComboBoxInit(IDC_ASPECTRATIO, theApp.m_gs_aspectratio, theApp.GetConfig("AspectRatio", 1));
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));
CheckDlgButton(m_hWnd, IDC_WINDOWED, theApp.GetConfig("windowed", 1));
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));
@ -198,7 +163,7 @@ void GSSettingsDlg::OnInit()
CheckDlgButton(m_hWnd, IDC_ACCURATE_DATE, theApp.GetConfig("accurate_date", 0));
CheckDlgButton(m_hWnd, IDC_ACCURATE_COLCLIP, theApp.GetConfig("accurate_colclip", 0));
CheckDlgButton(m_hWnd, IDC_TC_DEPTH, theApp.GetConfig("texture_cache_depth", 0));
// Shade Boost
CheckDlgButton(m_hWnd, IDC_SHADEBOOST, theApp.GetConfig("ShadeBoost", 0));
@ -279,15 +244,6 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
}
}
if(!m_IsOpen2 && ComboBoxGetSelData(IDC_RESOLUTION, data))
{
const D3DDISPLAYMODE* mode = (D3DDISPLAYMODE*)data;
theApp.SetConfig("ModeWidth", (int)mode->Width);
theApp.SetConfig("ModeHeight", (int)mode->Height);
theApp.SetConfig("ModeRefreshRate", (int)mode->RefreshRate);
}
if(ComboBoxGetSelData(IDC_RENDERER, data))
{
theApp.SetConfig("Renderer", (int)data);
@ -298,11 +254,6 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
theApp.SetConfig("Interlace", (int)data);
}
if(ComboBoxGetSelData(IDC_ASPECTRATIO, data))
{
theApp.SetConfig("AspectRatio", (int)data);
}
if(ComboBoxGetSelData(IDC_UPSCALE_MULTIPLIER, data))
{
theApp.SetConfig("upscale_multiplier", (int)data);
@ -317,11 +268,6 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
theApp.SetConfig("MaxAnisotropy", (int)data);
}
if(GetId() == IDD_CONFIG) // TODO: other options may not be present in IDD_CONFIG2 as well
{
theApp.SetConfig("windowed", (int)IsDlgButtonChecked(m_hWnd, IDC_WINDOWED));
}
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));
@ -336,8 +282,9 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
theApp.SetConfig("accurate_date", (int)IsDlgButtonChecked(m_hWnd, IDC_ACCURATE_DATE));
theApp.SetConfig("accurate_colclip", (int)IsDlgButtonChecked(m_hWnd, IDC_ACCURATE_COLCLIP));
theApp.SetConfig("texture_cache_depth", (int)IsDlgButtonChecked(m_hWnd, IDC_TC_DEPTH));
// Shade Boost
theApp.SetConfig("ShadeBoost", (int)IsDlgButtonChecked(m_hWnd, IDC_SHADEBOOST));

View File

@ -68,7 +68,6 @@ public:
class GSSettingsDlg : public GSDialog
{
list<D3DDISPLAYMODE> m_modes;
struct Adapter
{
@ -81,8 +80,6 @@ class GSSettingsDlg : public GSDialog
std::vector<const Adapter> adapters;
vector<GSSetting> m_ocl_devs;
bool m_IsOpen2;
uint32 m_lastValidMsaa; // used to revert to previous dialog value if the user changed to invalid one, or lesser one and canceled
void UpdateRenderers();
@ -97,5 +94,5 @@ protected:
GSHacksDlg HacksDlg;
public:
GSSettingsDlg(bool isOpen2);
GSSettingsDlg();
};

View File

@ -5,8 +5,7 @@ EXPORTS
PS2EgetLibType
PS2EgetLibName
PS2EgetLibVersion2
PS2EgetCpuPlatform
PS2EsetEmuVersion
PS2EgetCpuPlatform
GSsetBaseMem
GSinit
GSshutdown
@ -69,4 +68,4 @@ EXPORTS
GPUfreeze
GPUshowScreenPic
GPUgetScreenPic
GPUcursor
GPUcursor

View File

@ -141,54 +141,6 @@ BEGIN
RTEXT "100",IDC_CONTRAST_TEXT,288,75,15,8
END
IDD_CONFIG DIALOGEX 0, 0, 189, 370
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Settings..."
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL IDB_LOGO10,IDC_LOGO11,"Static",SS_BITMAP | SS_CENTERIMAGE,7,7,175,42
CONTROL IDB_LOGO9,IDC_LOGO9,"Static",SS_BITMAP | SS_CENTERIMAGE,7,7,175,44
LTEXT "Resolution:",IDC_STATIC,7,73,37,8
COMBOBOX IDC_RESOLUTION,71,71,72,125,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Renderer:",IDC_STATIC,7,88,34,8
COMBOBOX IDC_RENDERER,71,86,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Interlacing (F5):",IDC_STATIC,7,103,53,8
COMBOBOX IDC_INTERLACE,71,101,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Aspect Ratio (F6):",IDC_STATIC,7,118,60,8
COMBOBOX IDC_ASPECTRATIO,71,116,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
DEFPUSHBUTTON "OK",IDOK,43,349,50,14
PUSHBUTTON "Cancel",IDCANCEL,96,349,50,14
CONTROL "Window",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,146,73,36,10
LTEXT "D3D internal res:",IDC_STATIC,18,152,55,8
EDITTEXT IDC_RESX_EDIT,82,149,35,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_RESX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,110,148,11,14
EDITTEXT IDC_RESY_EDIT,120,149,35,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_RESY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,146,148,11,14
CONTROL "Native",IDC_NATIVERES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,123,182,33,10
COMBOBOX IDC_UPSCALE_MULTIPLIER,82,164,74,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Or use Scaling:",IDC_STATIC,18,167,49,8
LTEXT "Or use original PS2 resolution :",IDC_STATIC,18,182,99,8
GROUPBOX "D3D Enhancements (can cause glitches)",IDC_STATIC,7,134,175,66,BS_CENTER
LTEXT "Extra rendering threads:",IDC_STATIC,11,308,80,8
EDITTEXT IDC_SWTHREADS_EDIT,93,307,35,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,124,306,11,14
CONTROL "Texture filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,11,246,67,10
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,91,247,58,10
CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,262,78,10
CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,91,262,85,10
CONTROL "Edge anti-aliasing (AA1)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,323,93,10
CONTROL "Enable Shade Boost",IDC_SHADEBOOST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,221,79,10
PUSHBUTTON "Settings...",IDC_SHADEBUTTON,90,218,87,14
GROUPBOX "Software Mode Settings",IDC_STATIC,7,296,175,42,BS_CENTER
GROUPBOX "Hardware Mode Settings",IDC_STATIC,7,234,175,61,BS_CENTER
CONTROL "Enable HW Hacks",IDC_HACKS_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,278,71,10
PUSHBUTTON "Configure...",IDC_HACKSBUTTON,90,275,87,14
LTEXT "Adapter:",IDC_STATIC,7,58,30,8
COMBOBOX IDC_ADAPTER,71,56,111,125,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Enable FXAA",IDC_FXAA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,205,80,10
CONTROL "Enable FX shader",IDC_SHADER_FX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,91,205,80,10
END
IDD_CAPTURE DIALOGEX 0, 0, 279, 71
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Capture settings"
@ -233,7 +185,8 @@ BEGIN
CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,157,49,10
END
IDD_CONFIG2 DIALOGEX 0, 0, 187, 402
IDD_CONFIG DIALOGEX 0, 0, 187, 418
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Settings..."
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@ -270,7 +223,7 @@ BEGIN
CONTROL "Enable Shade Boost",IDC_SHADEBOOST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,186,79,10
CONTROL "Accurate Blend",IDC_ACCURATE_BLEND,"Button",BS_AUTO3STATE | WS_TABSTOP,10,259,67,10
CONTROL "Accurate Date",IDC_ACCURATE_DATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,259,67,10
CONTROL "Accurate color clip",IDC_ACCURATE_COLCLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,275,74,10
CONTROL "Accurate Color Clip",IDC_ACCURATE_COLCLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,275,74,10
PUSHBUTTON "Settings...",IDC_SHADEBUTTON,92,183,75,14
CONTROL "Enable HW Hacks",IDC_HACKS_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,291,71,10
PUSHBUTTON "Configure...",IDC_HACKSBUTTON,92,288,75,14
@ -310,19 +263,6 @@ BEGIN
BOTTOMMARGIN, 122
END
IDD_CONFIG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 182
VERTGUIDE, 11
VERTGUIDE, 71
VERTGUIDE, 89
VERTGUIDE, 182
TOPMARGIN, 7
BOTTOMMARGIN, 363
HORZGUIDE, 49
END
IDD_CAPTURE, DIALOG
BEGIN
VERTGUIDE, 6
@ -341,7 +281,7 @@ BEGIN
BOTTOMMARGIN, 192
END
IDD_CONFIG2, DIALOG
IDD_CONFIG, DIALOG
BEGIN
LEFTMARGIN, 6
RIGHTMARGIN, 181
@ -351,6 +291,7 @@ BEGIN
BOTTOMMARGIN, 360
END
END
#endif // APSTUDIO_INVOKED

View File

@ -76,23 +76,23 @@
#define IDC_ACCURATE_BLEND 2092
#define IDC_ACCURATE_DATE 2093
#define IDC_ACCURATE_COLCLIP 2094
#define IDC_ROUND_SPRITE 2095
#define IDC_ALIGN_SPRITE 2096
#define IDC_CRC_LEVEL 2097
#define IDC_CHECK1 2098
#define IDC_TC_DEPTH 2099
#define IDC_ACCURATE_FBMASK 2095
#define IDC_ROUND_SPRITE 2096
#define IDC_ALIGN_SPRITE 2097
#define IDC_CRC_LEVEL 2098
#define IDC_CHECK1 2099
#define IDC_TC_DEPTH 2100
#define IDC_COLORSPACE 3000
#define IDR_CONVERT_FX 10000
#define IDR_TFX_FX 10001
#define IDR_MERGE_FX 10002
#define IDR_INTERLACE_FX 10003
#define IDD_CONFIG2 10004
#define IDR_FXAA_FX 10005
#define IDR_CS_FX 10006
#define IDD_SHADEBOOST 10007
#define IDR_SHADEBOOST_FX 10009
#define IDR_TFX_CL 10010
#define IDD_HACKS 10011
#define IDR_FXAA_FX 10004
#define IDR_CS_FX 10005
#define IDD_SHADEBOOST 10006
#define IDR_SHADEBOOST_FX 10007
#define IDR_TFX_CL 10008
#define IDD_HACKS 10009
#define IDC_STATIC -1
// Next default values for new objects