mirror of https://github.com/PCSX2/pcsx2.git
GSdx: Get rid of d3d9 adapter code from GSSettingsdlg and GSDevice.
This commit is contained in:
parent
48b8d78139
commit
e12447101f
|
@ -436,14 +436,6 @@ GSAdapter::GSAdapter(const DXGI_ADAPTER_DESC1 &desc_dxgi)
|
|||
, 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
|
||||
|
|
|
@ -232,7 +232,6 @@ struct GSAdapter
|
|||
|
||||
#ifdef _WIN32
|
||||
GSAdapter(const DXGI_ADAPTER_DESC1 &desc_dxgi);
|
||||
GSAdapter(const D3DADAPTER_IDENTIFIER9 &desc_d3d9);
|
||||
#endif
|
||||
#ifdef __linux__
|
||||
// TODO
|
||||
|
|
|
@ -32,7 +32,6 @@ GSSettingsDlg::GSSettingsDlg()
|
|||
: GSDialog(IDD_CONFIG)
|
||||
, m_renderers{theApp.m_gs_renderers}
|
||||
, m_d3d11_adapters{EnumerateD3D11Adapters()}
|
||||
, m_d3d9_adapters{EnumerateD3D9Adapters()}
|
||||
, m_current_adapters{nullptr}
|
||||
, m_last_selected_adapter_id{theApp.GetConfigS("Adapter")}
|
||||
{
|
||||
|
@ -92,30 +91,6 @@ std::vector<GSSettingsDlg::Adapter> GSSettingsDlg::EnumerateD3D11Adapters()
|
|||
return adapters;
|
||||
}
|
||||
|
||||
std::vector<GSSettingsDlg::Adapter> GSSettingsDlg::EnumerateD3D9Adapters()
|
||||
{
|
||||
CComPtr<IDirect3D9> d3d9;
|
||||
d3d9.Attach(Direct3DCreate9(D3D_SDK_VERSION));
|
||||
if (d3d9 == nullptr)
|
||||
return {};
|
||||
|
||||
std::vector<Adapter> adapters{
|
||||
{"Default Hardware Device", "default", static_cast<D3D_FEATURE_LEVEL>(0)},
|
||||
{"Reference Device", "ref", static_cast<D3D_FEATURE_LEVEL>(0)},
|
||||
};
|
||||
|
||||
int n = d3d9->GetAdapterCount();
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
D3DADAPTER_IDENTIFIER9 desc;
|
||||
if (d3d9->GetAdapterIdentifier(i, 0, &desc) != D3D_OK)
|
||||
break;
|
||||
|
||||
adapters.push_back({desc.Description, GSAdapter(desc), static_cast<D3D_FEATURE_LEVEL>(0)});
|
||||
}
|
||||
return adapters;
|
||||
}
|
||||
|
||||
void GSSettingsDlg::OnInit()
|
||||
{
|
||||
__super::OnInit();
|
||||
|
@ -334,7 +309,7 @@ void GSSettingsDlg::UpdateAdapters()
|
|||
return;
|
||||
}
|
||||
|
||||
m_current_adapters = dx11 ? &m_d3d11_adapters : &m_d3d9_adapters;
|
||||
m_current_adapters = &m_d3d11_adapters;
|
||||
|
||||
std::vector<GSSetting> adapter_settings;
|
||||
unsigned int adapter_sel = 0;
|
||||
|
|
|
@ -91,14 +91,12 @@ class GSSettingsDlg : public GSDialog
|
|||
|
||||
std::vector<GSSetting> m_renderers;
|
||||
std::vector<Adapter> m_d3d11_adapters;
|
||||
std::vector<Adapter> m_d3d9_adapters;
|
||||
std::vector<Adapter> *m_current_adapters;
|
||||
std::string m_last_selected_adapter_id;
|
||||
|
||||
std::vector<GSSetting> m_ocl_devs;
|
||||
|
||||
std::vector<Adapter> EnumerateD3D11Adapters();
|
||||
std::vector<Adapter> EnumerateD3D9Adapters();
|
||||
|
||||
void UpdateAdapters();
|
||||
void UpdateControls();
|
||||
|
|
Loading…
Reference in New Issue