mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-10-07 14:27:56 +03:00
Android: Add simple launcher
This adds a minimal launcher activity for the android app, which does the followings: - Opens a file chooser to let user select a zip file - Extracts the zip into the app's internal storage - Launches the SDL activity
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "common.h"
|
||||
#include "fileio.h"
|
||||
#include "sys/nact.h"
|
||||
#include <unistd.h>
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include <emscripten.h>
|
||||
#include <emscripten/html5.h>
|
||||
@@ -14,6 +15,12 @@ SDL_Window* g_window;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#ifdef __ANDROID__
|
||||
// Chdir to the internal storage path where the launcher should have placed
|
||||
// game files.
|
||||
chdir(SDL_AndroidGetInternalStoragePath());
|
||||
#endif
|
||||
|
||||
SDL_Init(SDL_INIT_VIDEO);
|
||||
|
||||
// ウィンドウ表示
|
||||
|
||||
Reference in New Issue
Block a user