OSDN Git Service

iOS bugfix for FileHandle.exists() ==> original method has fallback to Classpath...
authorChristoph Aschwanden <contact@noblemaster.com>
Fri, 28 Sep 2012 16:48:48 +0000 (01:48 +0900)
committerChristoph Aschwanden <contact@noblemaster.com>
Fri, 28 Sep 2012 16:48:48 +0000 (01:48 +0900)
backends/gdx-backend-iosmonotouch/mono/mono/libgdx.a
backends/gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSFileHandle.java

index a681686..5d143be 100644 (file)
Binary files a/backends/gdx-backend-iosmonotouch/mono/mono/libgdx.a and b/backends/gdx-backend-iosmonotouch/mono/mono/libgdx.a differ
index 73d468e..22af557 100644 (file)
@@ -45,6 +45,18 @@ public class IOSFileHandle extends FileHandle {
                return new IOSFileHandle(parent, type);\r
        }\r
 \r
+       /**\r
+        * This overrides the original method in FileHandle to prevent crashes on iOS. The original method\r
+        * has a fallback to FileType.Classpath when FileType.Internal is used. FileType.Classpath is not\r
+        * supported on iOS.\r
+        * \r
+        * @return  True if the file exists.\r
+        */\r
+       @Override\r
+       public boolean exists () {\r
+               return file.exists();\r
+       }\r
+\r
        public File file () {\r
                if (type == FileType.External) return new File(IOSFiles.externalPath, file.getPath());\r
                if (type == FileType.Local) return new File(IOSFiles.localPath, file.getPath());\r