Browse Source

Fixed getPlatform for iOS

joliver82 1 year ago
parent
commit
1d47d39374
1 changed files with 13 additions and 1 deletions
  1. 13 1
      jme3-ios/src/main/java/com/jme3/system/ios/JmeIosSystem.java

+ 13 - 1
jme3-ios/src/main/java/com/jme3/system/ios/JmeIosSystem.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2024 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -108,6 +108,18 @@ public class JmeIosSystem extends JmeSystemDelegate {
 //                throw new UnsupportedOperationException("Not supported yet.");
     }
 
+    @Override
+    public Platform getPlatform() {
+        String arch = System.getProperty("os.arch").toLowerCase();
+        if (arch.contains("arm")) {
+            return Platform.iOS_ARM;
+        } else if (arch.contains("aarch")) {
+            return Platform.iOS_ARM;
+        } else {
+            return Platform.iOS_X86;
+        }
+    }
+
     @Override
     public void showSoftKeyboard(boolean show) {
         throw new UnsupportedOperationException("Not supported yet.");