I created the filesystem first, and then did a:shockdesign wrote: ↑Wed Sep 20, 2017 4:34 am Out of curiosity, are you creating builds off your Github version? I'm finding some odd things where it cannot launch the activity as it cannot find it.. Noticed I had to delete the android-project directory out of the SDL directory as well after untarring it, as there were some conflicts there.
I'm looking through the process. Getting hooks into Android when the app pauses and resumes should be pretty easy. Would just need methods on the emulator side to pause and resume that we can call (native hooks)
Code: Select all
git init
Code: Select all
/tmp/cuzebox-android/android-project/app/src/main/jni/SDL2/android-project/src/org/libsdl/app/SDLActivity.java
Code: Select all
user@debian:/tmp$ git clone https://github.com/artcfox/cuzebox-android
Cloning into 'cuzebox-android'...
remote: Counting objects: 124, done.
remote: Compressing objects: 100% (85/85), done.
remote: Total 124 (delta 24), reused 124 (delta 24), pack-reused 0
Receiving objects: 100% (124/124), 541.38 KiB | 0 bytes/s, done.
Resolving deltas: 100% (24/24), done.
user@debian:/tmp$ cd cuzebox-android/
user@debian:/tmp/cuzebox-android$ cd android-project/app/src/main/jni
user@debian:/tmp/cuzebox-android/android-project/app/src/main/jni$ tar xf ~/Downloads/SDL2-2.0.5.tar.gz
user@debian:/tmp/cuzebox-android/android-project/app/src/main/jni$ mv SDL2-2.0.5/ SDL2
user@debian:/tmp/cuzebox-android/android-project/app/src/main/jni$ cd SDL2/include/
user@debian:/tmp/cuzebox-android/android-project/app/src/main/jni/SDL2/include$ ln -s . SDL2
I ultimately don't want to hard code it. I figured that there must be a way to get that programmatically. SDL_GetBasePath() returns NULL on Android, butshockdesign wrote: ↑Wed Sep 20, 2017 4:36 am Also Artcfox, you can change the location of the files from
toCode: Select all
/storage/emulated/0/cuzebox
and that should be more compatible with more devices..Code: Select all
/sdcard/cuzebox
Code: Select all
SDL_AndroidGetExternalStoragePath()
Once we can change the app's string from org.libsdl.app to org.uzebox.cuzebox.app or something, then I figured that I'd use SDL_AndroidGetExternalStoragePath() in order to store the Bootloader, .uze files, and the game controller db. Though I might have to modify CUzeBox so it doesn't default to looking for the game controller database in SDL_GetBasePath() since that function returns NULL on Android.
Edit: Changed SDL_GetPrefPath() to SDL_AndroidGetExternalStoragePath().