2
0
Эх сурвалжийг харах

Added NX platform support.

woollybah 7 жил өмнө
parent
commit
1675c160b9
2 өөрчлөгдсөн 10 нэмэгдсэн , 3 устгасан
  1. 2 1
      options.bmx
  2. 8 2
      parser.bmx

+ 2 - 1
options.bmx

@@ -25,7 +25,7 @@ SuperStrict
 
 Import "base.configmap.bmx"
 
-Const version:String = "0.97"
+Const version:String = "0.98"
 
 Const BUILDTYPE_APP:Int = 0
 Const BUILDTYPE_MODULE:Int = 1
@@ -61,6 +61,7 @@ Global opt_arch:String
 '    linux
 '    android
 '    raspberrypi
+'    nx
 Global opt_platform:String
 ' framework
 Global opt_framework:String

+ 8 - 2
parser.bmx

@@ -2924,11 +2924,13 @@ End Rem
 					api = "linux"
 				Case "win32"
 					api = "win32"
+				Case "nx"
+					api = "nx"
 			End Select
 		End If
 
 		Select api
-			Case "c", "blitz", "macos", "linux"
+			Case "c", "blitz", "macos", "linux", "nx"
 				Return DECL_API_CDECL
 			Case "win32"
 				Return DECL_API_STDCALL
@@ -4302,7 +4304,11 @@ End Rem
 
 	' musl - linux only
 	env.InsertDecl New TConstDecl.Create( "musl",New TIntType,New TConstExpr.Create( New TIntType,(opt_musl And (opt_platform="linux" Or opt_platform="android" Or opt_platform="raspberrypi"))),0 )
-	
+
+	' nx / switch
+	env.InsertDecl New TConstDecl.Create( "nx",New TIntType,New TConstExpr.Create( New TIntType,opt_platform="nx" ),0 )
+	env.InsertDecl New TConstDecl.Create( "nxARM64",New TIntType,New TConstExpr.Create( New TIntType,opt_platform="nx" And opt_arch="arm64"),0 )	
+		
 	' new compiler
 	env.InsertDecl New TConstDecl.Create( "bmxng",New TIntType,New TConstExpr.Create( New TIntType, True ),0 )