Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F125870
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/util/android/SDL_android_main.cpp b/util/android/SDL_android_main.cpp
index 4058e6b9..99ce783d 100644
--- a/util/android/SDL_android_main.cpp
+++ b/util/android/SDL_android_main.cpp
@@ -1,36 +1,47 @@
/* Include the SDL main definition header */
#include "SDL_main.h"
/*******************************************************************************
Functions called by JNI
*******************************************************************************/
#include <jni.h>
// Called before SDL_main() to initialize JNI bindings in SDL library
extern "C" void SDL_Android_Init(JNIEnv* env, jclass cls);
// Library init
extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved)
{
return JNI_VERSION_1_4;
}
// Start up the SDL app
extern "C" void Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls, jobject obj)
{
/* This interface could expand with ABI negotiation, calbacks, etc. */
SDL_Android_Init(env, cls);
/* Run the application code! */
int status;
char *argv[2];
argv[0] = strdup("SDL_app");
argv[1] = NULL;
status = SDL_main(1, argv);
/* We exit here for consistency with other platforms. */
exit(status);
}
+extern "C" void Java_org_libsdl_app_SDLActivity_setExternalLocation(JNIEnv* env, jclass cls, jstring jpath)
+{
+ jboolean iscopy;
+ const jbyte *path = (*env)->GetStringUTFChars(env, jpath, &iscopy);
+ const char * externalLocation = strdup(path);
+ // TODO Set data path in paintown
+
+ (*env)->ReleaseStringUTFChars(env, jpath, path);
+}
+
+
/* vi: set ts=4 sw=4 expandtab: */
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Jun 11, 10:00 AM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
68246
Default Alt Text
(1 KB)
Attached To
Mode
R75 R-Tech1
Attached
Detach File
Event Timeline