mirror of https://github.com/PCSX2/pcsx2.git
GSdx: Remove support for D3D9 device on ps1 emu compatibility.
Note: Resolution scaling is unavailable right now so I disabled the option, if someone feels like fixing it they can do so.
This commit is contained in:
parent
e12447101f
commit
6a5bb5df83
|
@ -262,7 +262,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
|||
BEGIN
|
||||
CONTROL IDB_PSX_LOGO11,IDC_PSX_LOGO11,"Static",SS_BITMAP,7,7,175,42
|
||||
CONTROL IDB_PSX_NULL,IDC_PSX_NULL,"Static",SS_BITMAP,7,7,175,42
|
||||
LTEXT "Resolution:",IDC_STATIC,7,59,37,8
|
||||
LTEXT "Resolution:",IDC_RESOLUTION_TEXT,7,59,37,8
|
||||
COMBOBOX IDC_RESOLUTION,80,57,102,125,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Renderer:",IDC_STATIC,7,74,34,8
|
||||
COMBOBOX IDC_RENDERER,80,72,102,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
|
|
|
@ -35,36 +35,8 @@ void GPUSettingsDlg::OnInit()
|
|||
{
|
||||
__super::OnInit();
|
||||
|
||||
m_modes.clear();
|
||||
|
||||
{
|
||||
D3DDISPLAYMODE mode;
|
||||
memset(&mode, 0, sizeof(mode));
|
||||
m_modes.push_back(mode);
|
||||
|
||||
ComboBoxAppend(IDC_RESOLUTION, "Please select...", (LPARAM)&m_modes.back(), true);
|
||||
|
||||
if(CComPtr<IDirect3D9> d3d = Direct3DCreate9(D3D_SDK_VERSION))
|
||||
{
|
||||
uint32 w = theApp.GetConfigI("ModeWidth");
|
||||
uint32 h = theApp.GetConfigI("ModeHeight");
|
||||
uint32 hz = theApp.GetConfigI("ModeRefreshRate");
|
||||
|
||||
uint32 n = d3d->GetAdapterModeCount(D3DADAPTER_DEFAULT, D3DFMT_X8R8G8B8);
|
||||
|
||||
for(uint32 i = 0; i < n; i++)
|
||||
{
|
||||
if(S_OK == d3d->EnumAdapterModes(D3DADAPTER_DEFAULT, D3DFMT_X8R8G8B8, i, &mode))
|
||||
{
|
||||
m_modes.push_back(mode);
|
||||
|
||||
std::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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// FIXME: Someone can fix this to use D3D11 or OGL Device, D3D9 is no longer supported.
|
||||
ComboBoxAppend(IDC_RESOLUTION, "Please select...");
|
||||
|
||||
ComboBoxInit(IDC_RENDERER, theApp.m_gpu_renderers, theApp.GetConfigI("Renderer"));
|
||||
ComboBoxInit(IDC_FILTER, theApp.m_gpu_filter, theApp.GetConfigI("filter"));
|
||||
|
@ -90,15 +62,6 @@ bool GPUSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
|
|||
{
|
||||
INT_PTR data;
|
||||
|
||||
if(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);
|
||||
|
@ -143,6 +106,10 @@ void GPUSettingsDlg::UpdateControls()
|
|||
bool dx11 = renderer == GPURendererType::D3D11_SW;
|
||||
bool null = renderer == GPURendererType::NULL_Renderer;
|
||||
bool sw = !null;
|
||||
bool resscalenotsupported = true;
|
||||
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_RESOLUTION), !resscalenotsupported);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_RESOLUTION_TEXT), !resscalenotsupported);
|
||||
|
||||
ShowWindow(GetDlgItem(m_hWnd, IDC_PSX_LOGO11), dx11 ? SW_SHOW : SW_HIDE);
|
||||
ShowWindow(GetDlgItem(m_hWnd, IDC_PSX_NULL), null ? SW_SHOW : SW_HIDE);
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
|
||||
class GPUSettingsDlg : public GSDialog
|
||||
{
|
||||
std::list<D3DDISPLAYMODE> m_modes;
|
||||
|
||||
void UpdateControls();
|
||||
|
||||
protected:
|
||||
|
|
|
@ -58,8 +58,9 @@
|
|||
#define IDC_ASPECTRATIO 2077
|
||||
#define IDC_DITHERING 2078
|
||||
#define IDC_WINDOWED 2079
|
||||
#define IDC_RESOLUTION 2080
|
||||
#define IDC_SCALE 2081
|
||||
#define IDC_RESOLUTION_TEXT 2080
|
||||
#define IDC_RESOLUTION 2081
|
||||
#define IDC_SCALE 2082
|
||||
// Capture:
|
||||
#define IDD_CAPTURE 2090
|
||||
#define IDC_FILENAME 2091
|
||||
|
|
Loading…
Reference in New Issue