src/core/android/SDL_android.c
changeset 11270 31ce9a8ce2bd
parent 11239 856e5e3c1e86
child 11271 ab3f2402a777
     1.1 --- a/src/core/android/SDL_android.c	Sun Aug 13 20:51:08 2017 -0700
     1.2 +++ b/src/core/android/SDL_android.c	Sun Aug 13 20:55:59 2017 -0700
     1.3 @@ -636,6 +636,18 @@
     1.4      }
     1.5  }
     1.6  
     1.7 +void Android_JNI_SetOrientation(int w, int h, int resizable, const char *hint)
     1.8 +{
     1.9 +    jmethodID mid;
    1.10 +    JNIEnv *mEnv = Android_JNI_GetEnv();
    1.11 +    mid = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,"setOrientation","(IIZLjava/lang/String;)V");
    1.12 +    if (mid) {
    1.13 +        jstring jhint = (jstring)((*mEnv)->NewStringUTF(mEnv, (hint ? hint : "")));
    1.14 +        (*mEnv)->CallStaticVoidMethod(mEnv, mActivityClass, mid, w, h, (resizable? 1 : 0), jhint);
    1.15 +        (*mEnv)->DeleteLocalRef(mEnv, jhint);
    1.16 +    }
    1.17 +}
    1.18 +
    1.19  SDL_bool Android_JNI_GetAccelerometerValues(float values[3])
    1.20  {
    1.21      int i;