Skip to content

Commit 55983d8

Browse files
committed
Fix d3dx9 with Windows XP
1 parent 66b6756 commit 55983d8

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

Dllmain/BuildNo.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#define BUILD_NUMBER 8038
1+
#define BUILD_NUMBER 8039

Libraries/d3dx9.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616

1717
#define WIN32_LEAN_AND_MEAN
1818
#include "d3dx9.h"
19-
#include "d3dx9_data.h"
19+
#include "d3dx9_data_43.h"
20+
#include "d3dx9_data_47.h"
2021
#include <string>
2122
#include "External\MemoryModule\MemoryModule.h"
2223
#include "Utils\Utils.h"
@@ -99,11 +100,15 @@ void LoadD3dx9()
99100
RunOnce = false;
100101

101102
d3dx9Module = Utils::LoadMemoryToDLL((LPVOID)D3DX9_43, sizeof(D3DX9_43));
103+
#if (_WIN32_WINNT >= 0x0502)
102104
d3dCompileModule = Utils::LoadMemoryToDLL((LPVOID)D3DCompiler_47, sizeof(D3DCompiler_47));
105+
#else
106+
d3dCompileModule = Utils::LoadMemoryToDLL((LPVOID)D3DCompiler_43, sizeof(D3DCompiler_43));
107+
#endif
103108

104109
if (!d3dx9Module || !d3dCompileModule)
105110
{
106-
Logging::Log() << __FUNCTION__ << "Error: failed to load d3dx9 modules!";
111+
Logging::Log() << __FUNCTION__ << " Error: failed to load d3dx9 modules!";
107112
}
108113
if (d3dx9Module)
109114
{

Libraries/d3dx9_data_43.h

Lines changed: 9 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 0 additions & 3 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)