From 681435f6f1001df8e106b6d1f2a5bc59bf4115c8 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Thu, 1 Feb 2018 16:40:12 +0000 Subject: Adding preprocessor stuff to make it compatible with windows --- yage/core/loglevel.h | 12 ++++++++++++ yage/data/input.h | 12 ++++++++++++ 2 files changed, 24 insertions(+) (limited to 'yage') 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, -- cgit