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:
@@ -79,7 +79,7 @@ enum class ButtonId : int {
|
||||
|
||||
#ifdef __ANDROID__
|
||||
|
||||
const char* javaRomPath = NULL;
|
||||
static char javaRomPath[4096] = { 0 };
|
||||
bool fileDialogOpen = false;
|
||||
|
||||
//function to be called from C
|
||||
@@ -92,7 +92,7 @@ void openFilePickerFromC(JNIEnv* env, jobject javaObject) {
|
||||
// Define the native method to handle the selected file path
|
||||
extern "C" void JNICALL Java_com_dishii_mm_MainActivity_nativeHandleSelectedFile(JNIEnv* env, jobject obj, jstring filePath) {
|
||||
const char* filePathStr = env->GetStringUTFChars(filePath, 0);
|
||||
javaRomPath = strdup(filePathStr); // save filepath to string
|
||||
snprintf(javaRomPath, sizeof(javaRomPath), "%s", filePathStr);
|
||||
fileDialogOpen = false;
|
||||
env->ReleaseStringUTFChars(filePath, filePathStr);
|
||||
}
|
||||
@@ -322,7 +322,7 @@ bool Extractor::GetRomPathFromBox() {
|
||||
//Do nothing until it's chosen
|
||||
SDL_Delay(250);
|
||||
}
|
||||
SDL_Log("%s",javaRomPath);
|
||||
SDL_Log("javaRomPath: %s", javaRomPath);
|
||||
selection.push_back(javaRomPath);
|
||||
#endif
|
||||
if (selection.empty()) {
|
||||
@@ -332,12 +332,6 @@ bool Extractor::GetRomPathFromBox() {
|
||||
mCurrentRomPath = selection[0];
|
||||
#endif
|
||||
mCurRomSize = GetCurRomSize();
|
||||
#ifdef __ANDROID__
|
||||
if (javaRomPath) {
|
||||
free((void*)javaRomPath);
|
||||
javaRomPath = NULL;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user