Skip to content

Commit 5f05f9e

Browse files
committed
Fix compilation with MinGW
1 parent b2ceadc commit 5f05f9e

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

premake5.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ function findlibs()
149149
end
150150
filter { "platforms:*d3d9" }
151151
links { "gdi32", "d3d9" }
152-
filter { "platforms:*d3d9", "action:vs*" }
153-
links { "Xinput9_1_0" }
154152
filter {}
155153
end
156154

src/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ elseif(LIBRW_PLATFORM_D3D9)
188188
target_link_libraries(librw
189189
PRIVATE
190190
d3d9
191-
xinput
192191
)
193192
endif()
194193

src/d3d/rwd3d.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
#ifdef RW_D3D9
22
#ifdef WITH_D3D
33
#include <d3d9.h>
4+
#else
5+
typedef struct IDirect3DDevice9 IDirect3DDevice9;
46
#endif
57
#endif
68

79
namespace rw {
810

911
#ifdef RW_D3D9
1012

11-
#ifdef _WINDOWS_
13+
#if defined(_WINDOWS_) || defined(_WINDEF_H)
1214
struct EngineOpenParams
1315
{
1416
HWND window;
@@ -19,10 +21,7 @@ struct EngineOpenParams
1921
uint32 please_include_windows_h;
2022
};
2123
#endif
22-
#else
23-
#ifdef _D3D9_H_
24-
#error "please don't include d3d9.h for non-d3d9 platforms"
25-
#endif
24+
2625
#endif
2726

2827
namespace d3d {
@@ -32,10 +31,7 @@ extern bool32 isP8supported;
3231
extern Device renderdevice;
3332

3433
#ifdef RW_D3D9
35-
#ifdef _D3D9_H_
3634
extern IDirect3DDevice9 *d3ddevice;
37-
void setD3dMaterial(D3DMATERIAL9 *mat9);
38-
#endif
3935

4036
#define COLOR_ARGB(a, r, g, b) ((rw::uint32)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
4137

0 commit comments

Comments
 (0)