mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-11 02:29:29 +00:00
d3d12: Use ifdef to guard code
This commit is contained in:
parent
4f708ab9ee
commit
5e7531b9bf
7 changed files with 14 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
#if defined(DX12_SUPPORT)
|
||||||
#include "D3D12GSRender.h"
|
#include "D3D12GSRender.h"
|
||||||
#include <wrl/client.h>
|
#include <wrl/client.h>
|
||||||
#include <dxgi1_4.h>
|
#include <dxgi1_4.h>
|
||||||
|
@ -621,3 +622,4 @@ void D3D12GSRender::Flip()
|
||||||
{
|
{
|
||||||
check(m_swapChain->Present(1, 0));
|
check(m_swapChain->Present(1, 0));
|
||||||
}
|
}
|
||||||
|
#endif
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#if defined(DX12_SUPPORT)
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <d3d12.h>
|
#include <d3d12.h>
|
||||||
#include "rpcs3/Ini.h"
|
#include "rpcs3/Ini.h"
|
||||||
#include "Utilities/rPlatform.h" // only for rImage
|
#include "Utilities/rPlatform.h" // only for rImage
|
||||||
|
|
|
@ -37,7 +37,7 @@ void GSManager::Init()
|
||||||
default:
|
default:
|
||||||
case 0: m_render = new NullGSRender(); break;
|
case 0: m_render = new NullGSRender(); break;
|
||||||
case 1: m_render = new GLGSRender(); break;
|
case 1: m_render = new GLGSRender(); break;
|
||||||
#ifdef WIN32
|
#if defined(DX12_SUPPORT)
|
||||||
case 2: m_render = new D3D12GSRender(); break;
|
case 2: m_render = new D3D12GSRender(); break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "stdafx_gui.h"
|
#include "stdafx_gui.h"
|
||||||
|
#if defined(DX12_SUPPORT)
|
||||||
#include "Emu/Memory/Memory.h"
|
#include "Emu/Memory/Memory.h"
|
||||||
#include "Emu/System.h"
|
#include "Emu/System.h"
|
||||||
#include "D3DGSFrame.h"
|
#include "D3DGSFrame.h"
|
||||||
|
@ -98,3 +99,4 @@ HWND D3DGSFrame::getHandle() const
|
||||||
{
|
{
|
||||||
return canvas->GetHandle();
|
return canvas->GetHandle();
|
||||||
}
|
}
|
||||||
|
#endif
|
|
@ -1,4 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if defined(DX12_SUPPORT)
|
||||||
#include "Emu/RSX/D3D12/D3D12GSRender.h"
|
#include "Emu/RSX/D3D12/D3D12GSRender.h"
|
||||||
#include "Gui/GSFrame.h"
|
#include "Gui/GSFrame.h"
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
|
@ -29,4 +31,6 @@ struct D3DGSFrame : public GSFrame, public GSFrameBase2
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void OnSize(wxSizeEvent& event);
|
virtual void OnSize(wxSizeEvent& event);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -474,7 +474,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||||
|
|
||||||
cbox_gs_render->Append("Null");
|
cbox_gs_render->Append("Null");
|
||||||
cbox_gs_render->Append("OpenGL");
|
cbox_gs_render->Append("OpenGL");
|
||||||
#ifdef WIN32
|
#if defined(DX12_SUPPORT)
|
||||||
cbox_gs_render->Append("D3D12");
|
cbox_gs_render->Append("D3D12");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -138,10 +138,12 @@ bool Rpcs3App::OnInit()
|
||||||
return new GLGSFrame();
|
return new GLGSFrame();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
#if defined(DX12_SUPPORT)
|
||||||
SetGetD3DGSFrameCallback([]() ->GSFrameBase2*
|
SetGetD3DGSFrameCallback([]() ->GSFrameBase2*
|
||||||
{
|
{
|
||||||
return new D3DGSFrame();
|
return new D3DGSFrame();
|
||||||
});
|
});
|
||||||
|
#endif
|
||||||
|
|
||||||
g_msg_dialog.reset(new MsgDialogFrame);
|
g_msg_dialog.reset(new MsgDialogFrame);
|
||||||
g_savedata_dialog.reset(new SaveDataDialogFrame);
|
g_savedata_dialog.reset(new SaveDataDialogFrame);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue