mirror of https://github.com/PCSX2/pcsx2.git
GSDX: Adapter selection in the configuration dialog. Effective on D3D10/11 and probably on D3D9. D3D9 will not enumerate adapters with no connected outputs and I haven't actually tried connecting my integrated GPU to a display, but D3D11 doesn't care.
Probably only of interest to testers (and me). Absolutely do NOT select the reference device even out of extreme morbid curiosity. It's not even very good at being a reference despite being slower than you can probably believe. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5358 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
cd05504851
commit
469beeac14
|
@ -359,3 +359,38 @@ bool GSDevice::ResizeTexture(GSTexture** t, int w, int h)
|
||||||
return t2 != NULL;
|
return t2 != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GSAdapter::operator std::string() const
|
||||||
|
{
|
||||||
|
char buf[sizeof "12345678:12345678:12345678:12345678"];
|
||||||
|
sprintf(buf, "%.4X:%.4X:%.8X:%.2X", vendor, device, subsys, rev);
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GSAdapter::operator==(const GSAdapter &desc_dxgi) const
|
||||||
|
{
|
||||||
|
return vendor == desc_dxgi.vendor
|
||||||
|
&& device == desc_dxgi.device
|
||||||
|
&& subsys == desc_dxgi.subsys
|
||||||
|
&& rev == desc_dxgi.rev;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef _WINDOWS
|
||||||
|
GSAdapter::GSAdapter(const DXGI_ADAPTER_DESC1 &desc_dxgi)
|
||||||
|
: vendor(desc_dxgi.VendorId)
|
||||||
|
, device(desc_dxgi.DeviceId)
|
||||||
|
, subsys(desc_dxgi.SubSysId)
|
||||||
|
, rev(desc_dxgi.Revision)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
GSAdapter::GSAdapter(const D3DADAPTER_IDENTIFIER9 &desc_d3d9)
|
||||||
|
: vendor(desc_d3d9.VendorId)
|
||||||
|
, device(desc_d3d9.DeviceId)
|
||||||
|
, subsys(desc_d3d9.SubSysId)
|
||||||
|
, rev(desc_d3d9.Revision)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef _LINUX
|
||||||
|
// TODO
|
||||||
|
#endif
|
|
@ -154,3 +154,29 @@ public:
|
||||||
void AgePool();
|
void AgePool();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct GSAdapter
|
||||||
|
{
|
||||||
|
uint32 vendor;
|
||||||
|
uint32 device;
|
||||||
|
uint32 subsys;
|
||||||
|
uint32 rev;
|
||||||
|
|
||||||
|
operator std::string() const;
|
||||||
|
bool operator==(const GSAdapter&) const;
|
||||||
|
bool operator==(const std::string &s) const
|
||||||
|
{
|
||||||
|
return (std::string)*this == s;
|
||||||
|
}
|
||||||
|
bool operator==(const char *s) const
|
||||||
|
{
|
||||||
|
return (std::string)*this == s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef _WINDOWS
|
||||||
|
GSAdapter(const DXGI_ADAPTER_DESC1 &desc_dxgi);
|
||||||
|
GSAdapter(const D3DADAPTER_IDENTIFIER9 &desc_d3d9);
|
||||||
|
#endif
|
||||||
|
#ifdef _LINUX
|
||||||
|
// TODO
|
||||||
|
#endif
|
||||||
|
};
|
|
@ -55,6 +55,38 @@ bool GSDevice11::Create(GSWnd* wnd)
|
||||||
D3D11_RASTERIZER_DESC rd;
|
D3D11_RASTERIZER_DESC rd;
|
||||||
D3D11_BLEND_DESC bsd;
|
D3D11_BLEND_DESC bsd;
|
||||||
|
|
||||||
|
CComPtr<IDXGIAdapter1> adapter;
|
||||||
|
D3D_DRIVER_TYPE driver_type = D3D_DRIVER_TYPE_HARDWARE;
|
||||||
|
|
||||||
|
std::string adapter_id = theApp.GetConfig("Adapter", "default");
|
||||||
|
|
||||||
|
if (adapter_id == "default")
|
||||||
|
;
|
||||||
|
else if (adapter_id == "ref")
|
||||||
|
{
|
||||||
|
driver_type = D3D_DRIVER_TYPE_REFERENCE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CComPtr<IDXGIFactory1> dxgi_factory;
|
||||||
|
CreateDXGIFactory1(__uuidof(IDXGIFactory1), (void**)&dxgi_factory);
|
||||||
|
if (dxgi_factory)
|
||||||
|
for (int i = 0;; i++)
|
||||||
|
{
|
||||||
|
CComPtr<IDXGIAdapter1> enum_adapter;
|
||||||
|
if (S_OK != dxgi_factory->EnumAdapters1(i, &enum_adapter))
|
||||||
|
break;
|
||||||
|
DXGI_ADAPTER_DESC1 desc;
|
||||||
|
hr = enum_adapter->GetDesc1(&desc);
|
||||||
|
if (S_OK == hr && GSAdapter(desc) == adapter_id)
|
||||||
|
{
|
||||||
|
adapter = enum_adapter;
|
||||||
|
driver_type = D3D_DRIVER_TYPE_UNKNOWN;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
memset(&scd, 0, sizeof(scd));
|
memset(&scd, 0, sizeof(scd));
|
||||||
|
|
||||||
scd.BufferCount = 2;
|
scd.BufferCount = 2;
|
||||||
|
@ -94,8 +126,7 @@ bool GSDevice11::Create(GSWnd* wnd)
|
||||||
D3D_FEATURE_LEVEL_10_0,
|
D3D_FEATURE_LEVEL_10_0,
|
||||||
};
|
};
|
||||||
|
|
||||||
hr = D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, flags, levels, countof(levels), D3D11_SDK_VERSION, &scd, &m_swapchain, &m_dev, &level, &m_ctx);
|
hr = D3D11CreateDeviceAndSwapChain(adapter, driver_type, NULL, flags, levels, countof(levels), D3D11_SDK_VERSION, &scd, &m_swapchain, &m_dev, &level, &m_ctx);
|
||||||
// hr = D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_REFERENCE, NULL, flags, NULL, 0, D3D11_SDK_VERSION, &scd, &m_swapchain, &m_dev, &level, &m_ctx);
|
|
||||||
|
|
||||||
if(FAILED(hr)) return false;
|
if(FAILED(hr)) return false;
|
||||||
|
|
||||||
|
|
|
@ -47,9 +47,41 @@ GSDevice9::~GSDevice9()
|
||||||
if(m_state.ps_cb) _aligned_free(m_state.ps_cb);
|
if(m_state.ps_cb) _aligned_free(m_state.ps_cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void FindAdapter(IDirect3D9 *d3d9, UINT &adapter, D3DDEVTYPE &devtype, std::string adapter_id = "")
|
||||||
|
{
|
||||||
|
adapter = D3DADAPTER_DEFAULT;
|
||||||
|
devtype = D3DDEVTYPE_HAL;
|
||||||
|
|
||||||
|
if (!adapter_id.length())
|
||||||
|
adapter_id = theApp.GetConfig("Adapter", "default");
|
||||||
|
|
||||||
|
if (adapter_id == "default")
|
||||||
|
;
|
||||||
|
else if (adapter_id == "ref")
|
||||||
|
{
|
||||||
|
devtype = D3DDEVTYPE_REF;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int n = d3d9->GetAdapterCount();
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
D3DADAPTER_IDENTIFIER9 id;
|
||||||
|
if (D3D_OK != d3d9->GetAdapterIdentifier(i, 0, &id))
|
||||||
|
break;
|
||||||
|
if (GSAdapter(id) == adapter_id)
|
||||||
|
{
|
||||||
|
adapter = i;
|
||||||
|
devtype = D3DDEVTYPE_HAL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// if supported and null != msaa_desc, msaa_desc will contain requested Count and Quality
|
// if supported and null != msaa_desc, msaa_desc will contain requested Count and Quality
|
||||||
|
|
||||||
static bool IsMsaaSupported(IDirect3D9* d3d, D3DFORMAT depth_format, uint32 msaaCount, DXGI_SAMPLE_DESC* msaa_desc = NULL)
|
static bool IsMsaaSupported(IDirect3D9* d3d, UINT adapter, D3DDEVTYPE devtype, D3DFORMAT depth_format, uint32 msaaCount, DXGI_SAMPLE_DESC* msaa_desc = NULL)
|
||||||
{
|
{
|
||||||
if(msaaCount > 16) return false;
|
if(msaaCount > 16) return false;
|
||||||
|
|
||||||
|
@ -57,7 +89,7 @@ static bool IsMsaaSupported(IDirect3D9* d3d, D3DFORMAT depth_format, uint32 msaa
|
||||||
|
|
||||||
memset(&d3dcaps, 0, sizeof(d3dcaps));
|
memset(&d3dcaps, 0, sizeof(d3dcaps));
|
||||||
|
|
||||||
d3d->GetDeviceCaps(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &d3dcaps);
|
d3d->GetDeviceCaps(adapter, devtype, &d3dcaps);
|
||||||
|
|
||||||
DWORD quality[2] = {0, 0};
|
DWORD quality[2] = {0, 0};
|
||||||
|
|
||||||
|
@ -76,14 +108,14 @@ static bool IsMsaaSupported(IDirect3D9* d3d, D3DFORMAT depth_format, uint32 msaa
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool TestDepthFormat(IDirect3D9* d3d, D3DFORMAT format)
|
static bool TestDepthFormat(IDirect3D9* d3d, UINT adapter, D3DDEVTYPE devtype, D3DFORMAT format)
|
||||||
{
|
{
|
||||||
if(FAILED(d3d->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, format)))
|
if(FAILED(d3d->CheckDeviceFormat(adapter, devtype, D3DFMT_X8R8G8B8, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, format)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(FAILED(d3d->CheckDepthStencilMatch(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, D3DFMT_X8R8G8B8, format)))
|
if(FAILED(d3d->CheckDepthStencilMatch(adapter, devtype, D3DFMT_X8R8G8B8, D3DFMT_X8R8G8B8, format)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -91,7 +123,7 @@ static bool TestDepthFormat(IDirect3D9* d3d, D3DFORMAT format)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static D3DFORMAT BestD3dFormat(IDirect3D9* d3d, int msaaCount = 0, DXGI_SAMPLE_DESC* msaa_desc = NULL)
|
static D3DFORMAT BestD3dFormat(IDirect3D9* d3d, UINT adapter, D3DDEVTYPE devtype, int msaaCount = 0, DXGI_SAMPLE_DESC* msaa_desc = NULL)
|
||||||
{
|
{
|
||||||
// In descending order of preference
|
// In descending order of preference
|
||||||
|
|
||||||
|
@ -106,7 +138,7 @@ static D3DFORMAT BestD3dFormat(IDirect3D9* d3d, int msaaCount = 0, DXGI_SAMPLE_D
|
||||||
|
|
||||||
for(int i = 0; i < sizeof(fmts); i++)
|
for(int i = 0; i < sizeof(fmts); i++)
|
||||||
{
|
{
|
||||||
if(TestDepthFormat(d3d, fmts[i]) && (!msaaCount || IsMsaaSupported(d3d, fmts[i], msaaCount, msaa_desc)))
|
if(TestDepthFormat(d3d, adapter, devtype, fmts[i]) && (!msaaCount || IsMsaaSupported(d3d, adapter, devtype, fmts[i], msaaCount, msaa_desc)))
|
||||||
{
|
{
|
||||||
return fmts[i];
|
return fmts[i];
|
||||||
}
|
}
|
||||||
|
@ -117,13 +149,18 @@ static D3DFORMAT BestD3dFormat(IDirect3D9* d3d, int msaaCount = 0, DXGI_SAMPLE_D
|
||||||
|
|
||||||
// return: 32, 24, or 0 if not supported. if 1==msaa, considered as msaa=0
|
// return: 32, 24, or 0 if not supported. if 1==msaa, considered as msaa=0
|
||||||
|
|
||||||
uint32 GSDevice9::GetMaxDepth(uint32 msaa = 0)
|
uint32 GSDevice9::GetMaxDepth(uint32 msaa, std::string adapter_id)
|
||||||
{
|
{
|
||||||
CComPtr<IDirect3D9> d3d;
|
CComPtr<IDirect3D9> d3d;
|
||||||
|
|
||||||
d3d.Attach(Direct3DCreate9(D3D_SDK_VERSION));
|
d3d.Attach(Direct3DCreate9(D3D_SDK_VERSION));
|
||||||
|
|
||||||
switch(BestD3dFormat(d3d, msaa))
|
UINT adapter;
|
||||||
|
D3DDEVTYPE devtype;
|
||||||
|
|
||||||
|
FindAdapter(d3d, adapter, devtype, adapter_id);
|
||||||
|
|
||||||
|
switch(BestD3dFormat(d3d, adapter, devtype, msaa))
|
||||||
{
|
{
|
||||||
case D3DFMT_D32:
|
case D3DFMT_D32:
|
||||||
case D3DFMT_D32F_LOCKABLE:
|
case D3DFMT_D32F_LOCKABLE:
|
||||||
|
@ -156,18 +193,35 @@ bool GSDevice9::Create(GSWnd* wnd)
|
||||||
|
|
||||||
if(!m_d3d) return false;
|
if(!m_d3d) return false;
|
||||||
|
|
||||||
|
UINT adapter;
|
||||||
|
D3DDEVTYPE devtype;
|
||||||
|
|
||||||
|
FindAdapter(m_d3d, adapter, devtype);
|
||||||
|
|
||||||
|
D3DADAPTER_IDENTIFIER9 id;
|
||||||
|
|
||||||
|
if(S_OK == m_d3d->GetAdapterIdentifier(adapter, 0, &id))
|
||||||
|
{
|
||||||
|
printf("%s (%d.%d.%d.%d)\n",
|
||||||
|
id.Description,
|
||||||
|
id.DriverVersion.HighPart >> 16,
|
||||||
|
id.DriverVersion.HighPart & 0xffff,
|
||||||
|
id.DriverVersion.LowPart >> 16,
|
||||||
|
id.DriverVersion.LowPart & 0xffff);
|
||||||
|
}
|
||||||
|
|
||||||
ForceValidMsaaConfig();
|
ForceValidMsaaConfig();
|
||||||
|
|
||||||
// Get best format/depth for msaa. Assumption is that if the resulting depth is 24 instead of possible 32,
|
// Get best format/depth for msaa. Assumption is that if the resulting depth is 24 instead of possible 32,
|
||||||
// the user was already warned when she selected it. (Lower res z buffer without warning is unacceptable).
|
// the user was already warned when she selected it. (Lower res z buffer without warning is unacceptable).
|
||||||
|
|
||||||
m_depth_format = BestD3dFormat(m_d3d, m_msaa, &m_msaa_desc);
|
m_depth_format = BestD3dFormat(m_d3d, adapter, devtype, m_msaa, &m_msaa_desc);
|
||||||
|
|
||||||
if(D3DFMT_UNKNOWN == m_depth_format)
|
if(D3DFMT_UNKNOWN == m_depth_format)
|
||||||
{
|
{
|
||||||
// can't find a format with requested msaa, try without.
|
// can't find a format with requested msaa, try without.
|
||||||
|
|
||||||
m_depth_format = BestD3dFormat(m_d3d, 0);
|
m_depth_format = BestD3dFormat(m_d3d, adapter, devtype, 0);
|
||||||
|
|
||||||
if(D3DFMT_UNKNOWN == m_depth_format)
|
if(D3DFMT_UNKNOWN == m_depth_format)
|
||||||
{
|
{
|
||||||
|
|
|
@ -232,7 +232,7 @@ public:
|
||||||
bool HasStencil() { return m_depth_format == D3DFMT_D24S8; }
|
bool HasStencil() { return m_depth_format == D3DFMT_D24S8; }
|
||||||
bool HasDepth32() { return m_depth_format != D3DFMT_D24S8; }
|
bool HasDepth32() { return m_depth_format != D3DFMT_D24S8; }
|
||||||
|
|
||||||
static uint32 GetMaxDepth(uint32 msaaCount);
|
static uint32 GetMaxDepth(uint32 msaaCount = 0, std::string adapter_id = "");
|
||||||
static void ForceValidMsaaConfig();
|
static void ForceValidMsaaConfig();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -39,6 +39,13 @@ void GSSettingsDlg::OnInit()
|
||||||
|
|
||||||
m_modes.clear();
|
m_modes.clear();
|
||||||
|
|
||||||
|
CComPtr<IDirect3D9> d3d9;
|
||||||
|
d3d9.Attach(Direct3DCreate9(D3D_SDK_VERSION));
|
||||||
|
|
||||||
|
CComPtr<IDXGIFactory1> dxgi_factory;
|
||||||
|
if (GSUtil::CheckDXGI())
|
||||||
|
CreateDXGIFactory1(__uuidof(IDXGIFactory1), (void**)&dxgi_factory);
|
||||||
|
|
||||||
if(!m_IsOpen2)
|
if(!m_IsOpen2)
|
||||||
{
|
{
|
||||||
D3DDISPLAYMODE mode;
|
D3DDISPLAYMODE mode;
|
||||||
|
@ -47,21 +54,17 @@ void GSSettingsDlg::OnInit()
|
||||||
|
|
||||||
ComboBoxAppend(IDC_RESOLUTION, "Please select...", (LPARAM)&m_modes.back(), true);
|
ComboBoxAppend(IDC_RESOLUTION, "Please select...", (LPARAM)&m_modes.back(), true);
|
||||||
|
|
||||||
CComPtr<IDirect3D9> d3d;
|
if(d3d9)
|
||||||
|
|
||||||
d3d.Attach(Direct3DCreate9(D3D_SDK_VERSION));
|
|
||||||
|
|
||||||
if(d3d)
|
|
||||||
{
|
{
|
||||||
uint32 w = theApp.GetConfig("ModeWidth", 0);
|
uint32 w = theApp.GetConfig("ModeWidth", 0);
|
||||||
uint32 h = theApp.GetConfig("ModeHeight", 0);
|
uint32 h = theApp.GetConfig("ModeHeight", 0);
|
||||||
uint32 hz = theApp.GetConfig("ModeRefreshRate", 0);
|
uint32 hz = theApp.GetConfig("ModeRefreshRate", 0);
|
||||||
|
|
||||||
uint32 n = d3d->GetAdapterModeCount(D3DADAPTER_DEFAULT, D3DFMT_R5G6B5);
|
uint32 n = d3d9->GetAdapterModeCount(D3DADAPTER_DEFAULT, D3DFMT_R5G6B5);
|
||||||
|
|
||||||
for(uint32 i = 0; i < n; i++)
|
for(uint32 i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
if(S_OK == d3d->EnumAdapterModes(D3DADAPTER_DEFAULT, D3DFMT_R5G6B5, i, &mode))
|
if(S_OK == d3d9->EnumAdapterModes(D3DADAPTER_DEFAULT, D3DFMT_R5G6B5, i, &mode))
|
||||||
{
|
{
|
||||||
m_modes.push_back(mode);
|
m_modes.push_back(mode);
|
||||||
|
|
||||||
|
@ -73,25 +76,76 @@ void GSSettingsDlg::OnInit()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
D3D_FEATURE_LEVEL level = GSUtil::CheckDirect3D11Level();
|
adapters.clear();
|
||||||
|
|
||||||
vector<GSSetting> renderers;
|
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)));
|
||||||
|
|
||||||
for(size_t i = 0; i < theApp.m_gs_renderers.size(); i++)
|
if (dxgi_factory)
|
||||||
{
|
{
|
||||||
GSSetting r = theApp.m_gs_renderers[i];
|
for (int i = 0;; i++)
|
||||||
|
|
||||||
if(i >= 3 && i <= 5)
|
|
||||||
{
|
{
|
||||||
if(level < D3D_FEATURE_LEVEL_10_0) continue;
|
CComPtr<IDXGIAdapter1> adapter;
|
||||||
|
if (S_OK != dxgi_factory->EnumAdapters1(i, &adapter))
|
||||||
r.name = std::string("Direct3D") + (level >= D3D_FEATURE_LEVEL_11_0 ? "11" : "10");
|
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);
|
||||||
|
// GSDX isn't unicode!?
|
||||||
|
#if 1
|
||||||
|
int size = WideCharToMultiByte(CP_ACP, 0,
|
||||||
|
desc.Description, sizeof(desc.Description),
|
||||||
|
NULL, 0,
|
||||||
|
NULL, NULL);
|
||||||
|
char *buf = new char[size];
|
||||||
|
WideCharToMultiByte(CP_ACP, 0,
|
||||||
|
desc.Description, sizeof(desc.Description),
|
||||||
|
buf, size,
|
||||||
|
NULL, NULL);
|
||||||
|
adapters.push_back(Adapter(buf, GSAdapter(desc), level));
|
||||||
|
delete buf;
|
||||||
|
#else
|
||||||
|
adapters.push_back(Adapter(desc.Description, GSAdapter(desc), level));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (d3d9)
|
||||||
|
{
|
||||||
|
int n = d3d9->GetAdapterCount();
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
D3DADAPTER_IDENTIFIER9 desc;
|
||||||
|
if (D3D_OK != d3d9->GetAdapterIdentifier(i, 0, &desc))
|
||||||
|
break;
|
||||||
|
// GSDX isn't unicode!?
|
||||||
|
#if 0
|
||||||
|
wchar_t buf[sizeof desc.Description * sizeof(WCHAR)];
|
||||||
|
MultiByteToWideChar(CP_ACP /* I have no idea if this is right */, 0,
|
||||||
|
desc.Description, sizeof(desc.Description),
|
||||||
|
buf, sizeof buf / sizeof *buf);
|
||||||
|
adapters.push_back(Adapter(buf, GSAdapter(desc), (D3D_FEATURE_LEVEL)0));
|
||||||
|
#else
|
||||||
|
adapters.push_back(Adapter(desc.Description, GSAdapter(desc), (D3D_FEATURE_LEVEL)0));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
renderers.push_back(r);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboBoxInit(IDC_RENDERER, renderers, theApp.GetConfig("Renderer", 0));
|
std::string adapter_setting = theApp.GetConfig("Adapter", "default");
|
||||||
|
vector<GSSetting> adapter_settings;
|
||||||
|
unsigned adapter_sel = 0;
|
||||||
|
|
||||||
|
for (unsigned i = 0; i < adapters.size(); i++)
|
||||||
|
{
|
||||||
|
if (adapters[i].id == adapter_setting)
|
||||||
|
adapter_sel = i;
|
||||||
|
adapter_settings.push_back(GSSetting(i, adapters[i].name.c_str(), ""));
|
||||||
|
}
|
||||||
|
|
||||||
|
ComboBoxInit(IDC_ADAPTER, adapter_settings, adapter_sel);
|
||||||
|
UpdateRenderers();
|
||||||
ComboBoxInit(IDC_INTERLACE, theApp.m_gs_interlace, theApp.GetConfig("Interlace", 7)); // 7 = "auto", detects interlace based on SMODE2 register
|
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_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_UPSCALE_MULTIPLIER, theApp.m_gs_upscale_multiplier, theApp.GetConfig("upscale_multiplier", 1));
|
||||||
|
@ -126,96 +180,139 @@ void GSSettingsDlg::OnInit()
|
||||||
|
|
||||||
bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
|
bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
|
||||||
{
|
{
|
||||||
if(id == IDC_UPSCALE_MULTIPLIER && code == CBN_SELCHANGE)
|
switch (id)
|
||||||
{
|
{
|
||||||
UpdateControls();
|
case IDC_ADAPTER:
|
||||||
}
|
if (code == CBN_SELCHANGE)
|
||||||
if(id == IDC_RENDERER && code == CBN_SELCHANGE)
|
{
|
||||||
{
|
UpdateRenderers();
|
||||||
UpdateControls();
|
UpdateControls();
|
||||||
}
|
}
|
||||||
else if(id == IDC_NATIVERES && code == BN_CLICKED)
|
break;
|
||||||
{
|
case IDC_RENDERER:
|
||||||
UpdateControls();
|
case IDC_UPSCALE_MULTIPLIER:
|
||||||
}
|
if (code == CBN_SELCHANGE)
|
||||||
else if(id == IDC_SHADEBOOST && code == BN_CLICKED)
|
UpdateControls();
|
||||||
{
|
break;
|
||||||
UpdateControls();
|
case IDC_NATIVERES:
|
||||||
}
|
case IDC_SHADEBOOST:
|
||||||
else if(id == IDC_SHADEBUTTON && code == BN_CLICKED)
|
case IDC_HACKS_ENABLED:
|
||||||
{
|
if (code == BN_CLICKED)
|
||||||
ShadeBoostDlg.DoModal();
|
UpdateControls();
|
||||||
}
|
break;
|
||||||
else if(id == IDC_HACKS_ENABLED && code == BN_CLICKED)
|
case IDC_SHADEBUTTON:
|
||||||
{
|
if (code == BN_CLICKED)
|
||||||
UpdateControls();
|
ShadeBoostDlg.DoModal();
|
||||||
}
|
break;
|
||||||
else if(id == IDC_HACKSBUTTON && code == BN_CLICKED)
|
case IDC_HACKSBUTTON:
|
||||||
{
|
if (code == BN_CLICKED)
|
||||||
HacksDlg.DoModal();
|
HacksDlg.DoModal();
|
||||||
}
|
break;
|
||||||
else if(id == IDOK)
|
case IDOK:
|
||||||
{
|
|
||||||
INT_PTR data;
|
|
||||||
|
|
||||||
if(!m_IsOpen2 && ComboBoxGetSelData(IDC_RESOLUTION, data))
|
|
||||||
{
|
{
|
||||||
const D3DDISPLAYMODE* mode = (D3DDISPLAYMODE*)data;
|
INT_PTR data;
|
||||||
|
|
||||||
theApp.SetConfig("ModeWidth", (int)mode->Width);
|
if(ComboBoxGetSelData(IDC_ADAPTER, data))
|
||||||
theApp.SetConfig("ModeHeight", (int)mode->Height);
|
{
|
||||||
theApp.SetConfig("ModeRefreshRate", (int)mode->RefreshRate);
|
theApp.SetConfig("Adapter", adapters[(int)data].id.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(ComboBoxGetSelData(IDC_INTERLACE, data))
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
theApp.SetConfig("upscale_multiplier", 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
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));
|
||||||
|
theApp.SetConfig("fba", (int)IsDlgButtonChecked(m_hWnd, IDC_FBA));
|
||||||
|
theApp.SetConfig("aa1", (int)IsDlgButtonChecked(m_hWnd, IDC_AA1));
|
||||||
|
theApp.SetConfig("nativeres", (int)IsDlgButtonChecked(m_hWnd, IDC_NATIVERES));
|
||||||
|
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));
|
||||||
|
|
||||||
|
// Shade Boost
|
||||||
|
theApp.SetConfig("ShadeBoost", (int)IsDlgButtonChecked(m_hWnd, IDC_SHADEBOOST));
|
||||||
|
|
||||||
|
// Hacks
|
||||||
|
theApp.SetConfig("UserHacks", (int)IsDlgButtonChecked(m_hWnd, IDC_HACKS_ENABLED));
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
if(ComboBoxGetSelData(IDC_RENDERER, data))
|
|
||||||
{
|
|
||||||
theApp.SetConfig("Renderer", (int)data);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(ComboBoxGetSelData(IDC_INTERLACE, data))
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
theApp.SetConfig("upscale_multiplier", 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
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));
|
|
||||||
theApp.SetConfig("fba", (int)IsDlgButtonChecked(m_hWnd, IDC_FBA));
|
|
||||||
theApp.SetConfig("aa1", (int)IsDlgButtonChecked(m_hWnd, IDC_AA1));
|
|
||||||
theApp.SetConfig("nativeres", (int)IsDlgButtonChecked(m_hWnd, IDC_NATIVERES));
|
|
||||||
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));
|
|
||||||
|
|
||||||
// Shade Boost
|
|
||||||
theApp.SetConfig("ShadeBoost", (int)IsDlgButtonChecked(m_hWnd, IDC_SHADEBOOST));
|
|
||||||
|
|
||||||
// Hacks
|
|
||||||
theApp.SetConfig("UserHacks", (int)IsDlgButtonChecked(m_hWnd, IDC_HACKS_ENABLED));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return __super::OnCommand(hWnd, id, code);
|
return __super::OnCommand(hWnd, id, code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GSSettingsDlg::UpdateRenderers()
|
||||||
|
{
|
||||||
|
INT_PTR i;
|
||||||
|
|
||||||
|
if (!ComboBoxGetSelData(IDC_ADAPTER, i))
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Ugggh
|
||||||
|
HacksDlg.SetAdapter(adapters[(int)i].id);
|
||||||
|
|
||||||
|
D3D_FEATURE_LEVEL level = adapters[(int)i].level;
|
||||||
|
|
||||||
|
vector<GSSetting> renderers;
|
||||||
|
|
||||||
|
unsigned renderer_setting = theApp.GetConfig("Renderer", 0);
|
||||||
|
unsigned renderer_sel = 0;
|
||||||
|
|
||||||
|
for(size_t i = 0; i < theApp.m_gs_renderers.size(); i++)
|
||||||
|
{
|
||||||
|
GSSetting r = theApp.m_gs_renderers[i];
|
||||||
|
|
||||||
|
if(i >= 3 && i <= 5)
|
||||||
|
{
|
||||||
|
if(level < D3D_FEATURE_LEVEL_10_0) continue;
|
||||||
|
|
||||||
|
r.name = std::string("Direct3D") + (level >= D3D_FEATURE_LEVEL_11_0 ? "11" : "10");
|
||||||
|
}
|
||||||
|
|
||||||
|
renderers.push_back(r);
|
||||||
|
if (r.id == renderer_setting)
|
||||||
|
renderer_sel = renderer_setting;
|
||||||
|
}
|
||||||
|
|
||||||
|
ComboBoxInit(IDC_RENDERER, renderers, renderer_sel);
|
||||||
|
}
|
||||||
|
|
||||||
void GSSettingsDlg::UpdateControls()
|
void GSSettingsDlg::UpdateControls()
|
||||||
{
|
{
|
||||||
INT_PTR i;
|
INT_PTR i;
|
||||||
|
@ -386,7 +483,7 @@ void GSHacksDlg::OnInit()
|
||||||
{
|
{
|
||||||
if( i == 1) continue;
|
if( i == 1) continue;
|
||||||
|
|
||||||
int depth = GSDevice9::GetMaxDepth(i);
|
int depth = GSDevice9::GetMaxDepth(i, adapter_id);
|
||||||
|
|
||||||
if(depth)
|
if(depth)
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,6 +44,7 @@ class GSHacksDlg : public GSDialog
|
||||||
{
|
{
|
||||||
unsigned short cb2msaa[17];
|
unsigned short cb2msaa[17];
|
||||||
unsigned short msaa2cb[17];
|
unsigned short msaa2cb[17];
|
||||||
|
std::string adapter_id;
|
||||||
|
|
||||||
bool isdx9;
|
bool isdx9;
|
||||||
|
|
||||||
|
@ -57,13 +58,29 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GSHacksDlg();
|
GSHacksDlg();
|
||||||
|
|
||||||
|
// Ugh
|
||||||
|
void SetAdapter(std::string adapter_id_)
|
||||||
|
{
|
||||||
|
adapter_id = adapter_id_;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class GSSettingsDlg : public GSDialog
|
class GSSettingsDlg : public GSDialog
|
||||||
{
|
{
|
||||||
list<D3DDISPLAYMODE> m_modes;
|
list<D3DDISPLAYMODE> m_modes;
|
||||||
|
struct Adapter
|
||||||
|
{
|
||||||
|
std::string name;
|
||||||
|
std::string id;
|
||||||
|
D3D_FEATURE_LEVEL level;
|
||||||
|
Adapter(const std::string &n, const std::string &i, const D3D_FEATURE_LEVEL &l)
|
||||||
|
: name(n), id(i), level(l) {}
|
||||||
|
};
|
||||||
|
std::vector<const Adapter> adapters;
|
||||||
bool m_IsOpen2;
|
bool m_IsOpen2;
|
||||||
|
|
||||||
|
void UpdateRenderers();
|
||||||
void UpdateControls();
|
void UpdateControls();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -233,23 +233,6 @@ bool GSUtil::CheckDirectX()
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(IDirect3D9* d3d = Direct3DCreate9(D3D_SDK_VERSION))
|
|
||||||
{
|
|
||||||
D3DADAPTER_IDENTIFIER9 id;
|
|
||||||
|
|
||||||
if(S_OK == d3d->GetAdapterIdentifier(D3DADAPTER_DEFAULT, 0, &id))
|
|
||||||
{
|
|
||||||
printf("%s (%d.%d.%d.%d)\n",
|
|
||||||
id.Description,
|
|
||||||
id.DriverVersion.HighPart >> 16,
|
|
||||||
id.DriverVersion.HighPart & 0xffff,
|
|
||||||
id.DriverVersion.LowPart >> 16,
|
|
||||||
id.DriverVersion.LowPart & 0xffff);
|
|
||||||
}
|
|
||||||
|
|
||||||
d3d->Release();
|
|
||||||
}
|
|
||||||
|
|
||||||
string d3dx9_dll = format("d3dx9_%d.dll", D3DX_SDK_VERSION);
|
string d3dx9_dll = format("d3dx9_%d.dll", D3DX_SDK_VERSION);
|
||||||
|
|
||||||
if(HINSTANCE hDll = LoadLibrary(d3dx9_dll.c_str()))
|
if(HINSTANCE hDll = LoadLibrary(d3dx9_dll.c_str()))
|
||||||
|
|
|
@ -117,48 +117,50 @@ BEGIN
|
||||||
RTEXT "100",IDC_CONTRAST_TEXT,288,75,15,8
|
RTEXT "100",IDC_CONTRAST_TEXT,288,75,15,8
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_CONFIG DIALOGEX 0, 0, 189, 330
|
IDD_CONFIG DIALOGEX 0, 0, 189, 345
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Settings..."
|
CAPTION "Settings..."
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
CONTROL 2022,IDC_LOGO11,"Static",SS_BITMAP,7,7,175,42
|
CONTROL 2022,IDC_LOGO11,"Static",SS_BITMAP,7,7,175,42
|
||||||
CONTROL 2021,IDC_LOGO9,"Static",SS_BITMAP,7,7,175,44
|
CONTROL 2021,IDC_LOGO9,"Static",SS_BITMAP,7,7,175,44
|
||||||
LTEXT "Resolution:",IDC_STATIC,7,58,37,8
|
LTEXT "Resolution:",IDC_STATIC,7,73,37,8
|
||||||
COMBOBOX IDC_RESOLUTION,71,56,72,125,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_RESOLUTION,71,71,72,125,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Renderer:",IDC_STATIC,7,73,34,8
|
LTEXT "Renderer:",IDC_STATIC,7,88,34,8
|
||||||
COMBOBOX IDC_RENDERER,71,71,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_RENDERER,71,86,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Interlacing (F5):",IDC_STATIC,7,89,53,8
|
LTEXT "Interlacing (F5):",IDC_STATIC,7,103,53,8
|
||||||
COMBOBOX IDC_INTERLACE,71,86,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_INTERLACE,71,101,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Aspect Ratio (F6):",IDC_STATIC,7,104,60,8
|
LTEXT "Aspect Ratio (F6):",IDC_STATIC,7,118,60,8
|
||||||
COMBOBOX IDC_ASPECTRATIO,71,101,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_ASPECTRATIO,71,116,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
DEFPUSHBUTTON "OK",IDOK,43,309,50,14
|
DEFPUSHBUTTON "OK",IDOK,43,324,50,14
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,96,309,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,96,324,50,14
|
||||||
CONTROL "Window",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,146,58,36,10
|
CONTROL "Window",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,146,73,36,10
|
||||||
LTEXT "D3D internal res:",IDC_STATIC,18,137,55,8
|
LTEXT "D3D internal res:",IDC_STATIC,18,152,55,8
|
||||||
EDITTEXT IDC_RESX_EDIT,82,134,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
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,133,11,14
|
CONTROL "",IDC_RESX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,110,148,11,14
|
||||||
EDITTEXT IDC_RESY_EDIT,120,134,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
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,133,11,14
|
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,167,33,10
|
CONTROL "Native",IDC_NATIVERES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,123,182,33,10
|
||||||
COMBOBOX IDC_UPSCALE_MULTIPLIER,82,149,74,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_UPSCALE_MULTIPLIER,82,164,74,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Or use Scaling:",IDC_STATIC,18,152,49,8
|
LTEXT "Or use Scaling:",IDC_STATIC,18,167,49,8
|
||||||
LTEXT "Or use original PS2 resolution :",IDC_STATIC,18,167,99,8
|
LTEXT "Or use original PS2 resolution :",IDC_STATIC,18,182,99,8
|
||||||
GROUPBOX "D3D Enhancements (can cause glitches)",IDC_STATIC,7,119,175,66,BS_CENTER
|
GROUPBOX "D3D Enhancements (can cause glitches)",IDC_STATIC,7,134,175,66,BS_CENTER
|
||||||
LTEXT "Extra rendering threads:",IDC_STATIC,11,277,80,8
|
LTEXT "Extra rendering threads:",IDC_STATIC,11,292,80,8
|
||||||
EDITTEXT IDC_SWTHREADS_EDIT,93,276,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_SWTHREADS_EDIT,93,291,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,124,275,11,14
|
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,124,290,11,14
|
||||||
CONTROL "Texture filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,11,215,67,10
|
CONTROL "Texture filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,11,230,67,10
|
||||||
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,216,58,10
|
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,231,58,10
|
||||||
CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,231,78,10
|
CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,246,78,10
|
||||||
CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,231,85,10
|
CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,246,85,10
|
||||||
CONTROL "Edge anti-aliasing (AA1)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,292,93,10
|
CONTROL "Edge anti-aliasing (AA1)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,307,93,10
|
||||||
CONTROL "Enable Shade Boost",IDC_SHADEBOOST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,189,79,10
|
CONTROL "Enable Shade Boost",IDC_SHADEBOOST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,204,79,10
|
||||||
PUSHBUTTON "Settings...",IDC_SHADEBUTTON,88,186,87,14
|
PUSHBUTTON "Settings...",IDC_SHADEBUTTON,88,201,87,14
|
||||||
GROUPBOX "Software Mode Settings",IDC_STATIC,7,265,175,42,BS_CENTER
|
GROUPBOX "Software Mode Settings",IDC_STATIC,7,280,175,42,BS_CENTER
|
||||||
GROUPBOX "Hardware Mode Settings",IDC_STATIC,7,203,175,61,BS_CENTER
|
GROUPBOX "Hardware Mode Settings",IDC_STATIC,7,218,175,61,BS_CENTER
|
||||||
CONTROL "Enable HW Hacks",IDC_HACKS_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,247,71,10
|
CONTROL "Enable HW Hacks",IDC_HACKS_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,262,71,10
|
||||||
PUSHBUTTON "Configure...",IDC_HACKSBUTTON,88,244,87,14
|
PUSHBUTTON "Configure...",IDC_HACKSBUTTON,88,259,87,14
|
||||||
|
LTEXT "Adapter:",IDC_STATIC,7,58,30,8
|
||||||
|
COMBOBOX IDC_ADAPTER,71,56,111,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_CAPTURE DIALOGEX 0, 0, 279, 71
|
IDD_CAPTURE DIALOGEX 0, 0, 279, 71
|
||||||
|
@ -205,43 +207,45 @@ BEGIN
|
||||||
CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,157,49,10
|
CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,157,49,10
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_CONFIG2 DIALOGEX 0, 0, 187, 311
|
IDD_CONFIG2 DIALOGEX 0, 0, 187, 325
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Settings..."
|
CAPTION "Settings..."
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
CONTROL 2022,IDC_LOGO11,"Static",SS_BITMAP,6,6,173,42
|
CONTROL 2022,IDC_LOGO11,"Static",SS_BITMAP,6,6,173,42
|
||||||
DEFPUSHBUTTON "OK",IDOK,35,290,50,14
|
DEFPUSHBUTTON "OK",IDOK,35,304,50,14
|
||||||
LTEXT "Renderer:",IDC_STATIC,6,57,34,8
|
LTEXT "Renderer:",IDC_STATIC,6,72,34,8
|
||||||
COMBOBOX IDC_RENDERER,70,55,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_RENDERER,70,70,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Interlacing (F5):",IDC_STATIC,6,73,81,8
|
LTEXT "Interlacing (F5):",IDC_STATIC,6,87,53,8
|
||||||
COMBOBOX IDC_INTERLACE,70,70,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_INTERLACE,70,85,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Custom resolution:",IDC_STATIC,26,134,65,8
|
LTEXT "Custom resolution:",IDC_STATIC,26,149,65,8
|
||||||
EDITTEXT IDC_RESX_EDIT,92,132,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_RESX_EDIT,92,147,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "",IDC_RESX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,120,132,11,14
|
CONTROL "",IDC_RESX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,120,147,11,14
|
||||||
EDITTEXT IDC_RESY_EDIT,130,132,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_RESY_EDIT,130,147,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "",IDC_RESY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,154,132,11,14
|
CONTROL "",IDC_RESY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,154,147,11,14
|
||||||
CONTROL "Native",IDC_NATIVERES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,105,33,10
|
CONTROL "Native",IDC_NATIVERES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,120,33,10
|
||||||
LTEXT "Extra rendering threads:",IDC_STATIC,11,252,80,8
|
LTEXT "Extra rendering threads:",IDC_STATIC,11,267,80,8
|
||||||
EDITTEXT IDC_SWTHREADS_EDIT,94,250,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_SWTHREADS_EDIT,94,265,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,129,249,11,14
|
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,129,264,11,14
|
||||||
COMBOBOX IDC_UPSCALE_MULTIPLIER,92,117,74,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_UPSCALE_MULTIPLIER,92,132,74,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Or use Scaling:",IDC_STATIC,38,119,49,8
|
LTEXT "Or use Scaling:",IDC_STATIC,38,134,49,8
|
||||||
LTEXT "Original PS2 resolution :",IDC_STATIC,10,105,80,8
|
LTEXT "Original PS2 resolution :",IDC_STATIC,10,120,80,8
|
||||||
CONTROL "Edge anti-aliasing (AA1)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,268,93,10
|
CONTROL "Edge anti-aliasing (AA1)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,283,93,10
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,89,290,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,89,304,50,14
|
||||||
CONTROL 2021,IDC_LOGO9,"Static",SS_BITMAP,6,6,175,44
|
CONTROL 2021,IDC_LOGO9,"Static",SS_BITMAP,6,6,175,44
|
||||||
GROUPBOX "D3D Internal resolution (can cause glitches)",IDC_STATIC,6,87,175,64,BS_CENTER
|
GROUPBOX "D3D Internal resolution (can cause glitches)",IDC_STATIC,6,102,175,64,BS_CENTER
|
||||||
GROUPBOX "Software Mode Settings",IDC_STATIC,6,236,175,50,BS_CENTER
|
GROUPBOX "Software Mode Settings",IDC_STATIC,6,251,175,50,BS_CENTER
|
||||||
GROUPBOX "Hardware Mode Settings",IDC_STATIC,6,171,175,63,BS_CENTER
|
GROUPBOX "Hardware Mode Settings",IDC_STATIC,6,186,175,63,BS_CENTER
|
||||||
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,184,58,10
|
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,199,58,10
|
||||||
CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,200,87,10
|
CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,215,87,10
|
||||||
CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,200,82,10
|
CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,215,82,10
|
||||||
CONTROL "Texture filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,10,184,67,10
|
CONTROL "Texture filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,10,199,67,10
|
||||||
CONTROL "Enable Shade Boost",IDC_SHADEBOOST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,157,79,10
|
CONTROL "Enable Shade Boost",IDC_SHADEBOOST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,172,79,10
|
||||||
PUSHBUTTON "Settings...",IDC_SHADEBUTTON,95,154,75,14
|
PUSHBUTTON "Settings...",IDC_SHADEBUTTON,95,169,75,14
|
||||||
CONTROL "Enable HW Hacks",IDC_HACKS_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,216,71,10
|
CONTROL "Enable HW Hacks",IDC_HACKS_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,231,71,10
|
||||||
PUSHBUTTON "Configure...",IDC_HACKSBUTTON,95,213,75,14
|
PUSHBUTTON "Configure...",IDC_HACKSBUTTON,95,228,75,14
|
||||||
|
LTEXT "Adapter:",IDC_STATIC,6,57,30,8
|
||||||
|
COMBOBOX IDC_ADAPTER,70,55,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
|
@ -277,7 +281,7 @@ BEGIN
|
||||||
VERTGUIDE, 89
|
VERTGUIDE, 89
|
||||||
VERTGUIDE, 182
|
VERTGUIDE, 182
|
||||||
TOPMARGIN, 7
|
TOPMARGIN, 7
|
||||||
BOTTOMMARGIN, 323
|
BOTTOMMARGIN, 338
|
||||||
HORZGUIDE, 49
|
HORZGUIDE, 49
|
||||||
END
|
END
|
||||||
|
|
||||||
|
@ -305,7 +309,7 @@ BEGIN
|
||||||
RIGHTMARGIN, 181
|
RIGHTMARGIN, 181
|
||||||
VERTGUIDE, 87
|
VERTGUIDE, 87
|
||||||
TOPMARGIN, 6
|
TOPMARGIN, 6
|
||||||
BOTTOMMARGIN, 304
|
BOTTOMMARGIN, 318
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
#endif // APSTUDIO_INVOKED
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
|
@ -80,6 +80,7 @@
|
||||||
#define IDC_AGGRESSIVECRC 2076
|
#define IDC_AGGRESSIVECRC 2076
|
||||||
#define IDC_CHECK_DISABLE_ALL_HACKS 2077
|
#define IDC_CHECK_DISABLE_ALL_HACKS 2077
|
||||||
#define IDC_ALPHASTENCIL 2078
|
#define IDC_ALPHASTENCIL 2078
|
||||||
|
#define IDC_ADAPTER 2078
|
||||||
#define IDC_COLORSPACE 3000
|
#define IDC_COLORSPACE 3000
|
||||||
#define IDR_CONVERT_FX 10000
|
#define IDR_CONVERT_FX 10000
|
||||||
#define IDR_TFX_FX 10001
|
#define IDR_TFX_FX 10001
|
||||||
|
@ -98,7 +99,7 @@
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 10012
|
#define _APS_NEXT_RESOURCE_VALUE 10012
|
||||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||||
#define _APS_NEXT_CONTROL_VALUE 2078
|
#define _APS_NEXT_CONTROL_VALUE 2079
|
||||||
#define _APS_NEXT_SYMED_VALUE 5000
|
#define _APS_NEXT_SYMED_VALUE 5000
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue