Removed Win 8.1 requirement

This commit is contained in:
Jack Andersen 2015-11-06 19:15:50 -10:00
parent c3d423e5a4
commit 566befed81
2 changed files with 8 additions and 11 deletions

View File

@ -4,10 +4,8 @@
#include <Usbiodef.h> #include <Usbiodef.h>
#if _DEBUG #if _DEBUG
#define DXGI_CREATE_FLAGS DXGI_CREATE_FACTORY_DEBUG
#define D3D11_CREATE_DEVICE_FLAGS D3D11_CREATE_DEVICE_DEBUG #define D3D11_CREATE_DEVICE_FLAGS D3D11_CREATE_DEVICE_DEBUG
#else #else
#define DXGI_CREATE_FLAGS 0
#define D3D11_CREATE_DEVICE_FLAGS 0 #define D3D11_CREATE_DEVICE_FLAGS 0
#endif #endif
@ -95,11 +93,10 @@ public:
if (!dxgilib) if (!dxgilib)
Log.report(LogVisor::FatalError, "unable to load dxgi.dll"); Log.report(LogVisor::FatalError, "unable to load dxgi.dll");
typedef HRESULT(WINAPI*CreateDXGIFactory2PROC)(UINT Flags, REFIID riid, _COM_Outptr_ void **ppFactory); typedef HRESULT(WINAPI*CreateDXGIFactory1PROC)(REFIID riid, _COM_Outptr_ void **ppFactory);
CreateDXGIFactory2PROC MyCreateDXGIFactory2 = (CreateDXGIFactory2PROC)GetProcAddress(dxgilib, "CreateDXGIFactory2"); CreateDXGIFactory1PROC MyCreateDXGIFactory1 = (CreateDXGIFactory1PROC)GetProcAddress(dxgilib, "CreateDXGIFactory1");
if (!MyCreateDXGIFactory2) if (!MyCreateDXGIFactory1)
Log.report(LogVisor::FatalError, "unable to find CreateDXGIFactory2 in DXGI.dll\n" Log.report(LogVisor::FatalError, "unable to find CreateDXGIFactory1 in DXGI.dll\n");
"Windows 7 users should install \"Platform Update for Windows 7\" from Microsoft");
bool no12 = false; bool no12 = false;
bool noD3d = false; bool noD3d = false;
@ -143,7 +140,7 @@ public:
Log.report(LogVisor::FatalError, "unable to create D3D12 device"); Log.report(LogVisor::FatalError, "unable to create D3D12 device");
/* Obtain DXGI Factory */ /* Obtain DXGI Factory */
hr = MyCreateDXGIFactory2(DXGI_CREATE_FLAGS, __uuidof(IDXGIFactory4), &m_3dCtx.m_ctx12.m_dxFactory); hr = MyCreateDXGIFactory1(__uuidof(IDXGIFactory2), &m_3dCtx.m_ctx12.m_dxFactory);
if (FAILED(hr)) if (FAILED(hr))
Log.report(LogVisor::FatalError, "unable to create DXGI factory"); Log.report(LogVisor::FatalError, "unable to create DXGI factory");
@ -210,7 +207,7 @@ public:
/* Finally try OpenGL */ /* Finally try OpenGL */
{ {
/* Obtain DXGI Factory */ /* Obtain DXGI Factory */
HRESULT hr = MyCreateDXGIFactory2(DXGI_CREATE_FLAGS, __uuidof(IDXGIFactory4), &m_3dCtx.m_ctxOgl.m_dxFactory); HRESULT hr = MyCreateDXGIFactory1(__uuidof(IDXGIFactory1), &m_3dCtx.m_ctxOgl.m_dxFactory);
if (FAILED(hr)) if (FAILED(hr))
Log.report(LogVisor::FatalError, "unable to create DXGI factory"); Log.report(LogVisor::FatalError, "unable to create DXGI factory");

View File

@ -25,7 +25,7 @@ namespace boo {class IWindow;}
struct D3D12Context struct D3D12Context
{ {
ComPtr<IDXGIFactory4> m_dxFactory; ComPtr<IDXGIFactory2> m_dxFactory;
ComPtr<ID3D12Device> m_dev; ComPtr<ID3D12Device> m_dev;
ComPtr<ID3D12CommandAllocator> m_qalloc[2]; ComPtr<ID3D12CommandAllocator> m_qalloc[2];
ComPtr<ID3D12CommandQueue> m_q; ComPtr<ID3D12CommandQueue> m_q;
@ -76,7 +76,7 @@ struct D3D11Context
struct OGLContext struct OGLContext
{ {
ComPtr<IDXGIFactory4> m_dxFactory; ComPtr<IDXGIFactory1> m_dxFactory;
HGLRC m_lastContext = 0; HGLRC m_lastContext = 0;
struct Window struct Window
{ {