mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-18 17:35:44 +00:00
Windows build fixes
This commit is contained in:
@@ -32,6 +32,8 @@ std::condition_variable g_nwcv;
|
||||
static LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
pD3DCompile D3DCompilePROC = nullptr;
|
||||
pD3DCreateBlob D3DCreateBlobPROC = nullptr;
|
||||
pD3DPERF_BeginEvent D3DPERF_BeginEventPROC = nullptr;
|
||||
pD3DPERF_EndEvent D3DPERF_EndEventPROC = nullptr;
|
||||
|
||||
static bool FindBestD3DCompile() {
|
||||
HMODULE d3dCompilelib = LoadLibraryW(L"D3DCompiler_47.dll");
|
||||
@@ -55,6 +57,16 @@ static bool FindBestD3DCompile() {
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool FindD3DPERF() {
|
||||
HMODULE d3d9lib = LoadLibraryW(L"d3d9.dll");
|
||||
if (d3d9lib) {
|
||||
D3DPERF_BeginEventPROC = (pD3DPERF_BeginEvent)GetProcAddress(d3d9lib, "D3DPERF_BeginEvent");
|
||||
D3DPERF_EndEventPROC = (pD3DPERF_EndEvent)GetProcAddress(d3d9lib, "D3DPERF_EndEvent");
|
||||
return D3DPERF_BeginEventPROC != nullptr && D3DPERF_EndEventPROC != nullptr;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
namespace boo {
|
||||
static logvisor::Module Log("boo::ApplicationWin32");
|
||||
Win32Cursors WIN32_CURSORS;
|
||||
@@ -150,6 +162,8 @@ public:
|
||||
if (d3d11lib) {
|
||||
if (!FindBestD3DCompile())
|
||||
Log.report(logvisor::Fatal, fmt("unable to find D3DCompile_[43-47].dll"));
|
||||
if (!FindD3DPERF())
|
||||
Log.report(logvisor::Fatal, fmt("unable to find d3d9.dll"));
|
||||
|
||||
/* Create device proc */
|
||||
PFN_D3D11_CREATE_DEVICE MyD3D11CreateDevice =
|
||||
|
||||
Reference in New Issue
Block a user