comparison src/main/android/SDL_android_main.cpp @ 4998:a514bfe6952a

The window is changed to reflect the actual screen dimensions, for now. Implemented SDL_SetWindowTitle(), which turned out to be fairly complex
author Sam Lantinga <slouken@libsdl.org>
date Thu, 13 Jan 2011 15:10:17 -0800
parents 6c645018741e
children 55fccf89b340
comparison
equal deleted inserted replaced
4997:a21501393bef 4998:a514bfe6952a
6 Functions called by JNI 6 Functions called by JNI
7 *******************************************************************************/ 7 *******************************************************************************/
8 #include <jni.h> 8 #include <jni.h>
9 9
10 // Called before SDL_main() to initialize JNI bindings in SDL library 10 // Called before SDL_main() to initialize JNI bindings in SDL library
11 extern "C" void SDL_Android_Init(JNIEnv* env); 11 extern "C" void SDL_Android_Init(JNIEnv* env, jclass cls);
12 12
13 // Library init 13 // Library init
14 extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved) 14 extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved)
15 { 15 {
16 return JNI_VERSION_1_4; 16 return JNI_VERSION_1_4;
17 } 17 }
18 18
19 // Start up the SDL app 19 // Start up the SDL app
20 extern "C" void Java_org_libsdl_app_SDLActivity_nativeInit( JNIEnv* env, jobject obj ) 20 extern "C" void Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls, jobject obj)
21 { 21 {
22 /* This interface could expand with ABI negotiation, calbacks, etc. */ 22 /* This interface could expand with ABI negotiation, calbacks, etc. */
23 SDL_Android_Init(env); 23 SDL_Android_Init(env, cls);
24 24
25 /* Run the application code! */ 25 /* Run the application code! */
26 char *argv[2]; 26 char *argv[2];
27 argv[0] = strdup("SDL_app"); 27 argv[0] = strdup("SDL_app");
28 argv[1] = NULL; 28 argv[1] = NULL;