summaryrefslogtreecommitdiffstats
path: root/src/skel/crossplatform.h
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-07-24 19:43:51 +0200
committereray orçunus <erayorcunus@gmail.com>2020-07-24 20:35:04 +0200
commit15918feb8eca09c38d7a40d67cca10cecc4affdc (patch)
tree61826572f6be8a55658a8e8e5fc73b57bf5c6c64 /src/skel/crossplatform.h
parentAdd ps2 audio paths (diff)
downloadre3-15918feb8eca09c38d7a40d67cca10cecc4affdc.tar
re3-15918feb8eca09c38d7a40d67cca10cecc4affdc.tar.gz
re3-15918feb8eca09c38d7a40d67cca10cecc4affdc.tar.bz2
re3-15918feb8eca09c38d7a40d67cca10cecc4affdc.tar.lz
re3-15918feb8eca09c38d7a40d67cca10cecc4affdc.tar.xz
re3-15918feb8eca09c38d7a40d67cca10cecc4affdc.tar.zst
re3-15918feb8eca09c38d7a40d67cca10cecc4affdc.zip
Diffstat (limited to 'src/skel/crossplatform.h')
-rw-r--r--src/skel/crossplatform.h30
1 files changed, 23 insertions, 7 deletions
diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h
index 678d3ec4..066570be 100644
--- a/src/skel/crossplatform.h
+++ b/src/skel/crossplatform.h
@@ -3,19 +3,34 @@
// This is the common include for platform/renderer specific skeletons(glfw.cpp, win.cpp etc.) and using cross platform things (like Windows directories wrapper, platform specific global arrays etc.)
// Functions that's different on glfw and win but have same signature, should be located on platform.h.
+enum eWinVersion
+{
+ OS_WIN95 = 0,
+ OS_WIN98,
+ OS_WINNT,
+ OS_WIN2000,
+ OS_WINXP,
+};
+
#ifdef _WIN32
-// This only has <windef.h> as Windows header, which is lighter (as long as WITHWINDOWS isn't defined / <Windows.h> isn't included).
+
+// As long as WITHWINDOWS isn't defined / <Windows.h> isn't included, include <windef.h>, which is lighter.
+#ifndef _INC_WINDOWS
+ #ifdef _WIN64
+ #define _ARM64_
+ #else
+ #define _X86_
+ #endif
+ #include <windef.h>
+#endif
+#if defined RW_D3D9 || defined RWLIBS
#include "win.h"
+#endif
extern DWORD _dwOperatingSystemVersion;
+
#else
char *strupr(char *str);
char *strlwr(char *str);
-enum {
- OS_WIN98,
- OS_WIN2000,
- OS_WINNT,
- OS_WINXP,
-};
enum {
LANG_OTHER,
@@ -42,6 +57,7 @@ typedef struct
RwBool fullScreen;
RwV2d lastMousePos;
double mouseWheel; // glfw doesn't cache it
+ bool cursorIsInWindow;
RwInt8 joy1id;
RwInt8 joy2id;
}