Mercurial > sdl-ios-xcode
diff src/SDL_android.cpp @ 4981:55b82067815b
Fill in the video mode with the correct screen format
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 12 Jan 2011 14:29:01 -0800 |
parents | d9fdff945ec9 |
children | 58b6bb4a45e9 |
line wrap: on
line diff
--- a/src/SDL_android.cpp Wed Jan 12 13:52:41 2011 -0800 +++ b/src/SDL_android.cpp Wed Jan 12 14:29:01 2011 -0800 @@ -24,6 +24,7 @@ extern "C" { #include "events/SDL_events_c.h" #include "video/android/SDL_androidkeyboard.h" +#include "video/android/SDL_androidvideo.h" } /******************************************************************************* @@ -49,9 +50,6 @@ jmethodID midEnableFeature; jmethodID midUpdateAudio; -extern "C" void Android_SetScreenResolution(int width, int height); -extern "C" int SDL_SendQuit(); - //If we're not the active app, don't try to render bool bRenderingEnabled = false; @@ -145,21 +143,12 @@ SDL_SendQuit(); } -// Screen size -extern "C" void Java_org_libsdl_app_SDLActivity_nativeSetScreenSize( - JNIEnv* env, jobject obj, jint width, jint height) -{ - __android_log_print(ANDROID_LOG_INFO, "SDL", - "SDL: Set screen size on init: %d/%d\n", width, height); - Android_SetScreenResolution(width, height); -} - // Resize extern "C" void Java_org_libsdl_app_SDLActivity_onNativeResize( JNIEnv* env, jobject obj, jint width, jint height, jint format) { - /* FIXME: What is the relationship between this and the window? */ + Android_SetScreenResolution(width, height, format); } extern "C" void Java_org_libsdl_app_SDLActivity_onNativeAccel( @@ -229,3 +218,5 @@ __android_log_print(ANDROID_LOG_INFO, "SDL", "SDL: invoked\n"); } + +/* vi: set ts=4 sw=4 expandtab: */