diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-01-16 14:44:59 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-01-23 01:23:16 +0100 |
commit | f85b5e99edfb2e1b9a4563cacc96892195eee379 (patch) | |
tree | e8c670366d80e62776b0856466625b50af97c0c7 /src/core/common.h | |
parent | fix config.h (diff) | |
download | re3-f85b5e99edfb2e1b9a4563cacc96892195eee379.tar re3-f85b5e99edfb2e1b9a4563cacc96892195eee379.tar.gz re3-f85b5e99edfb2e1b9a4563cacc96892195eee379.tar.bz2 re3-f85b5e99edfb2e1b9a4563cacc96892195eee379.tar.lz re3-f85b5e99edfb2e1b9a4563cacc96892195eee379.tar.xz re3-f85b5e99edfb2e1b9a4563cacc96892195eee379.tar.zst re3-f85b5e99edfb2e1b9a4563cacc96892195eee379.zip |
Diffstat (limited to 'src/core/common.h')
-rw-r--r-- | src/core/common.h | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/src/core/common.h b/src/core/common.h index 2391f5fb..7fdbdf69 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -11,17 +11,34 @@ #include <string.h> #include <math.h> -#if defined _WIN32 && defined WITHWINDOWS -#include <windows.h> +#if !defined RW_D3D9 && defined LIBRW +#undef WITHD3D +#undef WITHDINPUT +#endif + +#if (defined WITHD3D && !defined LIBRW) +#define WITHWINDOWS #endif -#if defined _WIN32 && defined WITHD3D +#if defined _WIN32 && defined WITHWINDOWS && !defined _INC_WINDOWS #include <windows.h> -#ifndef USE_D3D9 -#include <d3d8types.h> -#else -#include <d3d9types.h> #endif + +#ifdef WITHD3D + #ifdef LIBRW + #define WITH_D3D // librw includes d3d9 itself via this right now + #else + #ifndef USE_D3D9 + #include <d3d8types.h> + #else + #include <d3d9types.h> + #endif + #endif +#endif + +#ifdef WITHDINPUT +#define DIRECTINPUT_VERSION 0x0800 +#include <dinput.h> #endif #include <rwcore.h> @@ -52,14 +69,6 @@ #define rwVENDORID_ROCKSTAR 0x0253F2 -// Get rid of bullshit windows definitions, we're not running on an 8086 -#ifdef far -#undef far -#endif -#ifdef near -#undef near -#endif - #define Max(a,b) ((a) > (b) ? (a) : (b)) #define Min(a,b) ((a) < (b) ? (a) : (b)) |