mirror of
https://github.com/aap/librw.git
synced 2024-11-24 20:55:41 +00:00
Fix compilation with MinGW
This commit is contained in:
parent
b164e49dcf
commit
39933ccc21
@ -134,10 +134,10 @@ function findlibs()
|
||||
else
|
||||
links { "SDL2" }
|
||||
end
|
||||
filter { "platforms:win-amd64-gl3" }
|
||||
filter { "platforms:win-amd64-gl3", "action:vs*" }
|
||||
libdirs { path.join(_OPTIONS["glfwdir64"], "lib-vc2015") }
|
||||
libdirs { path.join(_OPTIONS["sdl2dir"], "lib/x64") }
|
||||
filter { "platforms:win-x86-gl3" }
|
||||
filter { "platforms:win-x86-gl3", "action:vs*" }
|
||||
libdirs { path.join(_OPTIONS["glfwdir32"], "lib-vc2015") }
|
||||
libdirs { path.join(_OPTIONS["sdl2dir"], "lib/x86") }
|
||||
filter { "platforms:win*gl3" }
|
||||
@ -149,8 +149,6 @@ function findlibs()
|
||||
end
|
||||
filter { "platforms:*d3d9" }
|
||||
links { "gdi32", "d3d9" }
|
||||
filter { "platforms:*d3d9", "action:vs*" }
|
||||
links { "Xinput9_1_0" }
|
||||
filter {}
|
||||
end
|
||||
|
||||
|
@ -26,11 +26,13 @@
|
||||
#endif
|
||||
#include "imgui_internal.h"
|
||||
#include "ImGuizmo.h"
|
||||
#if !defined(_WIN32)
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#if !defined(_MSC_VER) && !defined(__MINGW64_VERSION_MAJOR)
|
||||
#define _malloca(x) alloca(x)
|
||||
#define _freea(x)
|
||||
#else
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
// includes patches for multiview from
|
||||
|
@ -188,7 +188,6 @@ elseif(LIBRW_PLATFORM_D3D9)
|
||||
target_link_libraries(librw
|
||||
PRIVATE
|
||||
d3d9
|
||||
xinput
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
#ifdef RW_D3D9
|
||||
#ifdef WITH_D3D
|
||||
#include <d3d9.h>
|
||||
#else
|
||||
typedef struct IDirect3DDevice9 IDirect3DDevice9;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -8,7 +10,7 @@ namespace rw {
|
||||
|
||||
#ifdef RW_D3D9
|
||||
|
||||
#ifdef _WINDOWS_
|
||||
#if defined(_WINDOWS_) || defined(_WINDEF_H)
|
||||
struct EngineOpenParams
|
||||
{
|
||||
HWND window;
|
||||
@ -19,10 +21,7 @@ struct EngineOpenParams
|
||||
uint32 please_include_windows_h;
|
||||
};
|
||||
#endif
|
||||
#else
|
||||
#ifdef _D3D9_H_
|
||||
#error "please don't include d3d9.h for non-d3d9 platforms"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
namespace d3d {
|
||||
@ -32,10 +31,7 @@ extern bool32 isP8supported;
|
||||
extern Device renderdevice;
|
||||
|
||||
#ifdef RW_D3D9
|
||||
#ifdef _D3D9_H_
|
||||
extern IDirect3DDevice9 *d3ddevice;
|
||||
void setD3dMaterial(D3DMATERIAL9 *mat9);
|
||||
#endif
|
||||
|
||||
#define COLOR_ARGB(a, r, g, b) ((rw::uint32)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user