Przeglądaj źródła

Implement PlatformUtility::terminate() on Linux

Marc Legendre 9 lat temu
rodzic
commit
1264d6ace5

+ 6 - 0
Source/BansheeUtility/CMakeSources.cmake

@@ -26,6 +26,10 @@ set(BS_BANSHEEUTILITY_SRC_WIN32
 	"Source/Win32/BsWin32Window.cpp"
 )
 
+set(BS_BANSHEEUTILITY_SRC_UNIX
+	"Source/Unix/BsUnixPlatformUtility.cpp"
+)
+
 set(BS_BANSHEEUTILITY_INC_IMAGE
 	"Include/BsColor.h"
 	"Include/BsTexAtlasGenerator.h"
@@ -305,4 +309,6 @@ set(BS_BANSHEEUTILITY_SRC
 if(WIN32)
 	list(APPEND BS_BANSHEEUTILITY_SRC ${BS_BANSHEEUTILITY_SRC_WIN32})
 	list(APPEND BS_BANSHEEUTILITY_SRC ${BS_BANSHEEUTILITY_INC_WIN32})
+else()
+	list(APPEND BS_BANSHEEUTILITY_SRC ${BS_BANSHEEUTILITY_SRC_UNIX})
 endif()

+ 13 - 0
Source/BansheeUtility/Source/Unix/BsUnixPlatformUtility.cpp

@@ -0,0 +1,13 @@
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#include "BsPlatformUtility.h"
+
+#include <stdlib.h>
+
+namespace BansheeEngine
+{
+	void PlatformUtility::terminate(bool force)
+	{
+		exit(0);
+	}
+}