Browse Source

Merge pull request #178 from rokups/rk/misc-fixes

Fix build on UWP, fix build with EASTL, fix including extra user type code
Michael R. P. Ragazzon 4 years ago
parent
commit
68cffac7af

+ 4 - 6
Include/RmlUi/Core/Colour.h

@@ -102,12 +102,10 @@ public:
 
 	ColourType red, green, blue, alpha;
 
-#ifdef RMLUI_COLOUR_USER_EXTRA
-	#if defined(__has_include) && __has_include(RMLUI_COLOUR_USER_EXTRA)
-		#include RMLUI_COLOUR_USER_EXTRA
-	#else
-		RMLUI_COLOUR_USER_EXTRA
-	#endif
+#if defined(RMLUI_COLOUR_USER_EXTRA)
+	RMLUI_COLOUR_USER_EXTRA
+#elif defined(RMLUI_COLOUR_USER_INCLUDE)
+	#include RMLUI_COLOUR_USER_INCLUDE
 #endif
 };
 

+ 4 - 6
Include/RmlUi/Core/Matrix4.h

@@ -499,12 +499,10 @@ class Matrix4
 		static ThisType Compose(const Vector3< Component >& translation, const Vector3< Component >& scale,
 			const Vector3< Component >& skew, const Vector4< Component >& perspective, const Vector4< Component >& quaternion) noexcept;
 
-#ifdef RMLUI_MATRIX4_USER_EXTRA
-	#if defined(__has_include) && __has_include(RMLUI_MATRIX4_USER_EXTRA)
-		#include RMLUI_MATRIX4_USER_EXTRA
-	#else
-		RMLUI_MATRIX4_USER_EXTRA
-	#endif
+#if defined(RMLUI_MATRIX4_USER_EXTRA)
+	RMLUI_MATRIX4_USER_EXTRA
+#elif defined(RMLUI_MATRIX4_USER_INCLUDE)
+	#include RMLUI_MATRIX4_USER_INCLUDE
 #endif
 };
 

+ 4 - 6
Include/RmlUi/Core/Vector2.h

@@ -153,12 +153,10 @@ class Vector2
 		Type x;
 		Type y;
 
-#ifdef RMLUI_VECTOR2_USER_EXTRA
-	#if defined(__has_include) && __has_include(RMLUI_VECTOR2_USER_EXTRA)
-		#include RMLUI_VECTOR2_USER_EXTRA
-	#else
-		RMLUI_VECTOR2_USER_EXTRA
-	#endif
+#if defined(RMLUI_VECTOR2_USER_EXTRA)
+	RMLUI_VECTOR2_USER_EXTRA
+#elif defined(RMLUI_VECTOR2_USER_INCLUDE)
+	#include RMLUI_VECTOR2_USER_INCLUDE
 #endif
 };
 

+ 4 - 6
Include/RmlUi/Core/Vector3.h

@@ -139,12 +139,10 @@ class Vector3
 		Type y;
 		Type z;
 
-#ifdef RMLUI_VECTOR3_USER_EXTRA
-	#if defined(__has_include) && __has_include(RMLUI_VECTOR3_USER_EXTRA)
-		#include RMLUI_VECTOR3_USER_EXTRA
-	#else
-		RMLUI_VECTOR3_USER_EXTRA
-	#endif
+#if defined(RMLUI_VECTOR3_USER_EXTRA)
+	RMLUI_VECTOR3_USER_EXTRA
+#elif defined(RMLUI_VECTOR3_USER_INCLUDE)
+	#include RMLUI_VECTOR3_USER_INCLUDE
 #endif
 };
 

+ 4 - 6
Include/RmlUi/Core/Vector4.h

@@ -144,12 +144,10 @@ class Vector4
 		Type z;
 		Type w;
 
-#ifdef RMLUI_VECTOR4_USER_EXTRA
-	#if defined(__has_include) && __has_include(RMLUI_VECTOR4_USER_EXTRA)
-		#include RMLUI_VECTOR4_USER_EXTRA
-	#else
-		RMLUI_VECTOR4_USER_EXTRA
-	#endif
+#if defined(RMLUI_VECTOR4_USER_EXTRA)
+	RMLUI_VECTOR4_USER_EXTRA
+#elif defined(RMLUI_VECTOR4_USER_INCLUDE)
+	#include RMLUI_VECTOR4_USER_INCLUDE
 #endif
 };
 

+ 1 - 0
Source/Core/DataModel.h

@@ -32,6 +32,7 @@
 #include "../../Include/RmlUi/Core/Header.h"
 #include "../../Include/RmlUi/Core/Types.h"
 #include "../../Include/RmlUi/Core/Traits.h"
+#include "../../Include/RmlUi/Core/DataModelHandle.h"
 #include "../../Include/RmlUi/Core/DataTypes.h"
 #include "../../Include/RmlUi/Core/DataVariable.h"
 

+ 2 - 0
Source/Core/SystemInterface.cpp

@@ -51,6 +51,7 @@ SystemInterface::~SystemInterface()
 bool SystemInterface::LogMessage(Log::Type logtype, const String& message)
 {
 	// By default we just send a platform message
+#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
 	if (logtype == Log::LT_ASSERT)
 	{
 		String message_user = CreateString(1024, "%s\nWould you like to interrupt execution?", message.c_str());	
@@ -59,6 +60,7 @@ bool SystemInterface::LogMessage(Log::Type logtype, const String& message)
 		return (IDNO == MessageBoxA(nullptr, message_user.c_str(), "Assertion Failure", MB_YESNO | MB_ICONSTOP | MB_DEFBUTTON2 | MB_TASKMODAL));
 	}
 	else
+#endif
 	{
 		OutputDebugStringA(message.c_str());
 		OutputDebugStringA("\r\n");