소스 검색

Fixed Android file access from within the .apk.

Lasse Öörni 12 년 전
부모
커밋
719e640c99
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      Source/Engine/IO/File.cpp

+ 8 - 0
Source/Engine/IO/File.cpp

@@ -210,7 +210,11 @@ bool File::Open(PackageFile* package, const String& fileName)
 
 unsigned File::Read(void* dest, unsigned size)
 {
+    #ifdef ANDROID
+    if (!handle_ && !assetHandle_)
+    #else
     if (!handle_)
+    #endif
     {
         // Do not log the error further here to prevent spamming the stderr stream
         return 0;
@@ -309,7 +313,11 @@ unsigned File::Read(void* dest, unsigned size)
 
 unsigned File::Seek(unsigned position)
 {
+    #ifdef ANDROID
+    if (!handle_ && !assetHandle_)
+    #else
     if (!handle_)
+    #endif
     {
         // Do not log the error further here to prevent spamming the stderr stream
         return 0;