aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2018-02-01 16:40:12 +0000
committerYann Herklotz <ymherklotz@gmail.com>2018-02-01 16:40:12 +0000
commit681435f6f1001df8e106b6d1f2a5bc59bf4115c8 (patch)
tree64c31b78ac392ab80b7ed0a419c7efad6631d72b
parent6c4772685909f1f47aa902532d955c77b8e8271d (diff)
downloadYAGE-681435f6f1001df8e106b6d1f2a5bc59bf4115c8.tar.gz
YAGE-681435f6f1001df8e106b6d1f2a5bc59bf4115c8.zip
Adding preprocessor stuff to make it compatible with windows
-rw-r--r--yage/core/loglevel.h12
-rw-r--r--yage/data/input.h12
2 files changed, 24 insertions, 0 deletions
diff --git a/yage/core/loglevel.h b/yage/core/loglevel.h
index 2247375d..bb115bbf 100644
--- a/yage/core/loglevel.h
+++ b/yage/core/loglevel.h
@@ -28,8 +28,20 @@ enum class LogLevel {
/// Warning message.
WARNING,
+#ifdef _WIN32
+#ifdef ERROR
+#define YAGE_ERROR_TMP ERROR
+#undef ERROR
+#endif
+#endif
/// Error message.
ERROR,
+#ifdef _WIN32
+#ifdef YAGE_ERROR_TMP
+#define ERROR YAGE_ERROR_TMP
+#undef YAGE_ERROR_TMP
+#endif
+#endif
/// Fatal message that should be output when the game
/// crashes.
diff --git a/yage/data/input.h b/yage/data/input.h
index 866793d8..4d5e09b3 100644
--- a/yage/data/input.h
+++ b/yage/data/input.h
@@ -77,7 +77,19 @@ enum class key {
TAB = GLFW_KEY_TAB,
BACKSPACE = GLFW_KEY_BACKSPACE,
INSERT = GLFW_KEY_INSERT,
+#ifdef _WIN32
+#ifdef DELETE
+#define YAGE_DELETE_TMP DELETE
+#undef DELETE
+#endif
+#endif
DELETE = GLFW_KEY_DELETE,
+#ifdef _WIN32
+#ifdef YAGE_DELETE_TMP
+#define DELETE YAGE_DELETE_TMP
+#undef YAGE_DELETE_TMP
+#endif
+#endif
RIGHT = GLFW_KEY_RIGHT,
LEFT = GLFW_KEY_LEFT,
DOWN = GLFW_KEY_DOWN,