Skip to content
Permalink
Browse files

Android: Removed three internal functions not used by SDL.

They were not needed internally since the switch to the common EGL backend.

Thanks to the SDL mailing list for pointing out that the functions seem unused.
  • Loading branch information
philippwiesemann committed Sep 27, 2015
1 parent ab2a350 commit 10daf1f4d328d607afd65fa22c202ae8ec58d449

File 2 of 3 in 10daf1f

@@ -71,7 +71,6 @@ static jclass mActivityClass;

/* method signatures */
static jmethodID midGetNativeSurface;
static jmethodID midFlipBuffers;
static jmethodID midAudioInit;
static jmethodID midAudioWriteShortBuffer;
static jmethodID midAudioWriteByteBuffer;
@@ -119,8 +118,6 @@ JNIEXPORT void JNICALL SDL_Android_Init(JNIEnv* mEnv, jclass cls)

midGetNativeSurface = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
"getNativeSurface","()Landroid/view/Surface;");
midFlipBuffers = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
"flipBuffers","()V");
midAudioInit = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
"audioInit", "(IZZI)I");
midAudioWriteShortBuffer = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
@@ -134,7 +131,7 @@ JNIEXPORT void JNICALL SDL_Android_Init(JNIEnv* mEnv, jclass cls)

bHasNewData = SDL_FALSE;

if(!midGetNativeSurface || !midFlipBuffers || !midAudioInit ||
if (!midGetNativeSurface || !midAudioInit ||
!midAudioWriteShortBuffer || !midAudioWriteByteBuffer || !midAudioQuit || !midPollInputDevices) {
__android_log_print(ANDROID_LOG_WARN, "SDL", "SDL: Couldn't locate Java callbacks, check that they're named and typed correctly");
}
@@ -267,11 +264,6 @@ JNIEXPORT void JNICALL Java_org_libsdl_app_SDLActivity_onNativeSurfaceDestroyed(

}

JNIEXPORT void JNICALL Java_org_libsdl_app_SDLActivity_nativeFlipBuffers(JNIEnv* env, jclass jcls)
{
SDL_GL_SwapWindow(Android_Window);
}

/* Keydown */
JNIEXPORT void JNICALL Java_org_libsdl_app_SDLActivity_onNativeKeyDown(
JNIEnv* env, jclass jcls, jint keycode)
@@ -478,12 +470,6 @@ ANativeWindow* Android_JNI_GetNativeWindow(void)
return anw;
}

void Android_JNI_SwapWindow(void)
{
JNIEnv *mEnv = Android_JNI_GetEnv();
(*mEnv)->CallStaticVoidMethod(mEnv, mActivityClass, midFlipBuffers);
}

void Android_JNI_SetActivityTitle(const char *title)
{
jmethodID mid;

0 comments on commit 10daf1f

Please sign in to comment.