Codecat 8 лет назад
Родитель
Сommit
0bb8c148bf
3 измененных файлов с 8 добавлено и 2 удалено
  1. 5 0
      include/bx/platform.h
  2. 1 1
      scripts/toolchain.lua
  3. 2 1
      src/os.cpp

+ 5 - 0
include/bx/platform.h

@@ -59,6 +59,7 @@
 #define BX_PLATFORM_WINDOWS    0
 #define BX_PLATFORM_WINDOWS    0
 #define BX_PLATFORM_WINRT      0
 #define BX_PLATFORM_WINRT      0
 #define BX_PLATFORM_XBOXONE    0
 #define BX_PLATFORM_XBOXONE    0
+#define BX_PLATFORM_NX         0
 
 
 // http://sourceforge.net/apps/mediawiki/predef/index.php?title=Compilers
 // http://sourceforge.net/apps/mediawiki/predef/index.php?title=Compilers
 #if defined(__clang__)
 #if defined(__clang__)
@@ -213,6 +214,9 @@
 #elif defined(__GNU__)
 #elif defined(__GNU__)
 #	undef  BX_PLATFORM_HURD
 #	undef  BX_PLATFORM_HURD
 #	define BX_PLATFORM_HURD 1
 #	define BX_PLATFORM_HURD 1
+#elif defined(__NX__)
+# undef BX_PLATFORM_NX
+# define BX_PLATFORM_NX 1
 #endif //
 #endif //
 
 
 #if !BX_CRT_NONE
 #if !BX_CRT_NONE
@@ -258,6 +262,7 @@
 		|| BX_PLATFORM_STEAMLINK  \
 		|| BX_PLATFORM_STEAMLINK  \
 		|| BX_PLATFORM_PS4        \
 		|| BX_PLATFORM_PS4        \
 		|| BX_PLATFORM_RPI        \
 		|| BX_PLATFORM_RPI        \
+		|| BX_PLATFORM_NX         \
 		)
 		)
 
 
 #define BX_PLATFORM_NONE !(0      \
 #define BX_PLATFORM_NONE !(0      \

+ 1 - 1
scripts/toolchain.lua

@@ -547,7 +547,7 @@ function toolchain(_buildDir, _libDir)
 			"EnableSSE2",
 			"EnableSSE2",
 		}
 		}
 
 
-	configuration { "vs*", "not orbis" }
+	configuration { "vs*", "not orbis", "not NX32", "not NX64" }
 		includedirs { path.join(bxDir, "include/compat/msvc") }
 		includedirs { path.join(bxDir, "include/compat/msvc") }
 		defines {
 		defines {
 			"WIN32",
 			"WIN32",

+ 2 - 1
src/os.cpp

@@ -23,7 +23,8 @@
 	|| BX_PLATFORM_OSX        \
 	|| BX_PLATFORM_OSX        \
 	|| BX_PLATFORM_PS4        \
 	|| BX_PLATFORM_PS4        \
 	|| BX_PLATFORM_RPI        \
 	|| BX_PLATFORM_RPI        \
-	|| BX_PLATFORM_STEAMLINK
+	|| BX_PLATFORM_STEAMLINK  \
+	|| BX_PLATFORM_NX
 #	include <sched.h> // sched_yield
 #	include <sched.h> // sched_yield
 #	if BX_PLATFORM_BSD  \
 #	if BX_PLATFORM_BSD  \
 	|| BX_PLATFORM_IOS  \
 	|| BX_PLATFORM_IOS  \