mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
special external storage permission
- bump SDL to 2.32.0 - bump NDK to r27c - bump AGP to 8.8.0 - bump Gradle to 8.10.2 - bump CMake to 3.31.5 - bump targetSdkVersion to 34 - add GitHub Actions Release support (Debug) - add Special External Storage Permission support - fix "assets not found" error on first launch - add Android 5 & 6 support
This commit is contained in:
@@ -37,7 +37,21 @@ typedef enum FlashSlotFile {
|
||||
((GET_NEWF(save, 0) == 'Z') && (GET_NEWF(save, 1) == 'E') && (GET_NEWF(save, 2) == 'L') && \
|
||||
(GET_NEWF(save, 3) == 'D') && (GET_NEWF(save, 4) == 'A') && (GET_NEWF(save, 5) == '3'))
|
||||
|
||||
#if !defined(__ANDROID__)
|
||||
const std::filesystem::path savesFolderPath(Ship::Context::GetPathRelativeToAppDirectory("saves", appShortName));
|
||||
#else
|
||||
// in Android, when targeting SurfaceFlinger (ANativeWindow, ART, calling JNI), to avoid problems, one should usually
|
||||
// try to avoid using C++ features that run port-sensitive code in early initialization BEFORE main() (SDL_main())
|
||||
// actually runs, like __attribute__((constructor)) and method-initialized global variables,
|
||||
// because it is necessary to wait until after the Java Activity initializes JNI before calling certain methods.
|
||||
// the Java Activity will call SDL_main() when it is ready to execute native code, and does not expect native application
|
||||
// code to be running before that point.
|
||||
std::filesystem::path savesFolderPath;
|
||||
// call this function early in main() before any other functions that use savesFolderPath are called.
|
||||
void SaveManager_Init(void) {
|
||||
savesFolderPath = Ship::Context::GetPathRelativeToAppDirectory("saves", appShortName);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Migrations
|
||||
// The idea here is that we can read in any version of the save as generic JSON, then apply migrations
|
||||
|
||||
Reference in New Issue
Block a user