Procházet zdrojové kódy

Use 64-bit fseek | Upgrade Android minSdkVersion to 24 (#3061)

https://stackoverflow.com/questions/55571842/android-error-use-of-undeclared-identifier-fseeko
1vanK před 3 roky
rodič
revize
323f71be79

+ 7 - 1
Source/Urho3D/IO/File.cpp

@@ -525,7 +525,13 @@ void File::SeekInternal(unsigned newPosition)
     }
     else
 #endif
-        fseek((FILE*)handle_, newPosition, SEEK_SET);
+    {
+#ifdef _MSC_VER
+        _fseeki64((FILE*)handle_, newPosition, SEEK_SET);
+#else
+        fseeko64((FILE*)handle_, newPosition, SEEK_SET);
+#endif
+    }
 }
 
 }

+ 1 - 1
android/launcher-app/build.gradle.kts

@@ -16,7 +16,7 @@ android {
     ndkVersion = ndkSideBySideVersion
     compileSdkVersion(30)
     defaultConfig {
-        minSdkVersion(18)
+        minSdkVersion(24)
         targetSdkVersion(30)
         applicationId = "io.urho3d.launcher"
         versionCode = 1

+ 1 - 1
android/urho3d-lib/build.gradle.kts

@@ -21,7 +21,7 @@ android {
     ndkVersion = ndkSideBySideVersion
     compileSdkVersion(30)
     defaultConfig {
-        minSdkVersion(18)
+        minSdkVersion(24)
         targetSdkVersion(30)
         versionCode = 1
         versionName = project.version.toString()