Mercurial > sdl-ios-xcode
comparison android/project/jni/android-support.cpp @ 4953:4f40b11e1045
Fixed prototype for SDL_main()
FIXME: Still need to pass some arguments - can we get them from the Java class?
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 04 Jan 2011 11:39:52 -0800 |
parents | 9076cdb027af |
children | 5e42031a8d70 |
comparison
equal
deleted
inserted
replaced
4952:18fe0aded409 | 4953:4f40b11e1045 |
---|---|
34 jmethodID midCreateGLContext; | 34 jmethodID midCreateGLContext; |
35 jmethodID midFlipBuffers; | 35 jmethodID midFlipBuffers; |
36 jmethodID midEnableFeature; | 36 jmethodID midEnableFeature; |
37 jmethodID midUpdateAudio; | 37 jmethodID midUpdateAudio; |
38 | 38 |
39 extern "C" int SDL_main(); | 39 extern "C" int SDL_main(int argc, char *argv[]); |
40 extern "C" int Android_OnKeyDown(int keycode); | 40 extern "C" int Android_OnKeyDown(int keycode); |
41 extern "C" int Android_OnKeyUp(int keycode); | 41 extern "C" int Android_OnKeyUp(int keycode); |
42 extern "C" void Android_SetScreenResolution(int width, int height); | 42 extern "C" void Android_SetScreenResolution(int width, int height); |
43 extern "C" void Android_OnResize(int width, int height, int format); | 43 extern "C" void Android_OnResize(int width, int height, int format); |
44 extern "C" int SDL_SendQuit(); | 44 extern "C" int SDL_SendQuit(); |
101 mEnv = env; | 101 mEnv = env; |
102 bRenderingEnabled = true; | 102 bRenderingEnabled = true; |
103 | 103 |
104 Android_EnableFeature(FEATURE_ACCEL, true); | 104 Android_EnableFeature(FEATURE_ACCEL, true); |
105 | 105 |
106 SDL_main(); | 106 SDL_main(0, 0); |
107 } | 107 } |
108 | 108 |
109 //Keydown | 109 //Keydown |
110 extern "C" void Java_org_libsdl_app_SDLActivity_onNativeKeyDown(JNIEnv* env, | 110 extern "C" void Java_org_libsdl_app_SDLActivity_onNativeKeyDown(JNIEnv* env, |
111 jobject obj, jint keycode){ | 111 jobject obj, jint keycode){ |