Skip to content
Permalink
Browse files
Fixing issues discovered by Philipp Wiesemann
  • Loading branch information
stopiccot committed Apr 23, 2014
1 parent 612f4a6 commit 3cdae42d6500619f9105134606e722f1fa49c847
Showing with 5 additions and 5 deletions.
  1. +3 −3 android-project/src/org/libsdl/app/SDLActivity.java
  2. +1 −1 include/SDL_hints.h
  3. +1 −1 src/core/android/SDL_android.c
@@ -300,7 +300,7 @@ public static native int nativeAddJoystick(int device_id, String name,
int is_accelerometer, int nbuttons,
int naxes, int nhats, int nballs);
public static native int nativeRemoveJoystick(int device_id);
public static native String getHint(String name);
public static native String nativeGetHint(String name);

public static void flipBuffers() {
SDLActivity.nativeFlipBuffers();
@@ -507,8 +507,8 @@ public static void pollInputDevices() {
public InputStream openAPKExtensionInputStream(String fileName) throws IOException {
// Get a ZipResourceFile representing a merger of both the main and patch files
if (expansionFile == null) {
Integer mainVersion = Integer.parseInt(getHint("SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"));
Integer patchVersion = Integer.parseInt(getHint("SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"));
Integer mainVersion = Integer.parseInt(nativeGetHint("SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"));
Integer patchVersion = Integer.parseInt(nativeGetHint("SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION"));

expansionFile = APKExpansionSupport.getAPKExpansionZipFile(this, mainVersion, patchVersion);
}
@@ -443,7 +443,7 @@ extern "C" {
/**
* \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc.
*/
#define SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_PATCH_VERSION"
#define SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION"


/**
@@ -385,7 +385,7 @@ void Java_org_libsdl_app_SDLInputConnection_nativeSetComposingText(
(*env)->ReleaseStringUTFChars(env, text, utftext);
}

jstring Java_org_libsdl_app_SDLActivity_getHint(JNIEnv* env, jclass cls, jstring name) {
jstring Java_org_libsdl_app_SDLActivity_nativeGetHint(JNIEnv* env, jclass cls, jstring name) {
const char *utfname = (*env)->GetStringUTFChars(env, name, NULL);
const char *hint = SDL_GetHint(utfname);

0 comments on commit 3cdae42

Please sign in to comment.