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.
parent
ab2a350033
commit
10daf1f4d3
|
@ -427,20 +427,12 @@ public class SDLActivity extends Activity {
|
||||||
public static native void onNativeAccel(float x, float y, float z);
|
public static native void onNativeAccel(float x, float y, float z);
|
||||||
public static native void onNativeSurfaceChanged();
|
public static native void onNativeSurfaceChanged();
|
||||||
public static native void onNativeSurfaceDestroyed();
|
public static native void onNativeSurfaceDestroyed();
|
||||||
public static native void nativeFlipBuffers();
|
|
||||||
public static native int nativeAddJoystick(int device_id, String name,
|
public static native int nativeAddJoystick(int device_id, String name,
|
||||||
int is_accelerometer, int nbuttons,
|
int is_accelerometer, int nbuttons,
|
||||||
int naxes, int nhats, int nballs);
|
int naxes, int nhats, int nballs);
|
||||||
public static native int nativeRemoveJoystick(int device_id);
|
public static native int nativeRemoveJoystick(int device_id);
|
||||||
public static native String nativeGetHint(String name);
|
public static native String nativeGetHint(String name);
|
||||||
|
|
||||||
/**
|
|
||||||
* This method is called by SDL using JNI.
|
|
||||||
*/
|
|
||||||
public static void flipBuffers() {
|
|
||||||
SDLActivity.nativeFlipBuffers();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is called by SDL using JNI.
|
* This method is called by SDL using JNI.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -71,7 +71,6 @@ static jclass mActivityClass;
|
||||||
|
|
||||||
/* method signatures */
|
/* method signatures */
|
||||||
static jmethodID midGetNativeSurface;
|
static jmethodID midGetNativeSurface;
|
||||||
static jmethodID midFlipBuffers;
|
|
||||||
static jmethodID midAudioInit;
|
static jmethodID midAudioInit;
|
||||||
static jmethodID midAudioWriteShortBuffer;
|
static jmethodID midAudioWriteShortBuffer;
|
||||||
static jmethodID midAudioWriteByteBuffer;
|
static jmethodID midAudioWriteByteBuffer;
|
||||||
|
@ -119,8 +118,6 @@ JNIEXPORT void JNICALL SDL_Android_Init(JNIEnv* mEnv, jclass cls)
|
||||||
|
|
||||||
midGetNativeSurface = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
|
midGetNativeSurface = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
|
||||||
"getNativeSurface","()Landroid/view/Surface;");
|
"getNativeSurface","()Landroid/view/Surface;");
|
||||||
midFlipBuffers = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
|
|
||||||
"flipBuffers","()V");
|
|
||||||
midAudioInit = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
|
midAudioInit = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
|
||||||
"audioInit", "(IZZI)I");
|
"audioInit", "(IZZI)I");
|
||||||
midAudioWriteShortBuffer = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
|
midAudioWriteShortBuffer = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
|
||||||
|
@ -134,7 +131,7 @@ JNIEXPORT void JNICALL SDL_Android_Init(JNIEnv* mEnv, jclass cls)
|
||||||
|
|
||||||
bHasNewData = SDL_FALSE;
|
bHasNewData = SDL_FALSE;
|
||||||
|
|
||||||
if(!midGetNativeSurface || !midFlipBuffers || !midAudioInit ||
|
if (!midGetNativeSurface || !midAudioInit ||
|
||||||
!midAudioWriteShortBuffer || !midAudioWriteByteBuffer || !midAudioQuit || !midPollInputDevices) {
|
!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");
|
__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 */
|
/* Keydown */
|
||||||
JNIEXPORT void JNICALL Java_org_libsdl_app_SDLActivity_onNativeKeyDown(
|
JNIEXPORT void JNICALL Java_org_libsdl_app_SDLActivity_onNativeKeyDown(
|
||||||
JNIEnv* env, jclass jcls, jint keycode)
|
JNIEnv* env, jclass jcls, jint keycode)
|
||||||
|
@ -478,12 +470,6 @@ ANativeWindow* Android_JNI_GetNativeWindow(void)
|
||||||
return anw;
|
return anw;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Android_JNI_SwapWindow(void)
|
|
||||||
{
|
|
||||||
JNIEnv *mEnv = Android_JNI_GetEnv();
|
|
||||||
(*mEnv)->CallStaticVoidMethod(mEnv, mActivityClass, midFlipBuffers);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Android_JNI_SetActivityTitle(const char *title)
|
void Android_JNI_SetActivityTitle(const char *title)
|
||||||
{
|
{
|
||||||
jmethodID mid;
|
jmethodID mid;
|
||||||
|
|
|
@ -33,9 +33,6 @@ extern "C" {
|
||||||
#include "SDL_rect.h"
|
#include "SDL_rect.h"
|
||||||
|
|
||||||
/* Interface from the SDL library into the Android Java activity */
|
/* Interface from the SDL library into the Android Java activity */
|
||||||
/* extern SDL_bool Android_JNI_CreateContext(int majorVersion, int minorVersion, int red, int green, int blue, int alpha, int buffer, int depth, int stencil, int buffers, int samples);
|
|
||||||
extern SDL_bool Android_JNI_DeleteContext(void); */
|
|
||||||
extern void Android_JNI_SwapWindow(void);
|
|
||||||
extern void Android_JNI_SetActivityTitle(const char *title);
|
extern void Android_JNI_SetActivityTitle(const char *title);
|
||||||
extern SDL_bool Android_JNI_GetAccelerometerValues(float values[3]);
|
extern SDL_bool Android_JNI_GetAccelerometerValues(float values[3]);
|
||||||
extern void Android_JNI_ShowTextInput(SDL_Rect *inputRect);
|
extern void Android_JNI_ShowTextInput(SDL_Rect *inputRect);
|
||||||
|
@ -64,7 +61,7 @@ SDL_bool Android_JNI_HasClipboardText(void);
|
||||||
|
|
||||||
/* Power support */
|
/* Power support */
|
||||||
int Android_JNI_GetPowerInfo(int* plugged, int* charged, int* battery, int* seconds, int* percent);
|
int Android_JNI_GetPowerInfo(int* plugged, int* charged, int* battery, int* seconds, int* percent);
|
||||||
|
|
||||||
/* Joystick support */
|
/* Joystick support */
|
||||||
void Android_JNI_PollInputDevices(void);
|
void Android_JNI_PollInputDevices(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue