src/core/android/SDL_android.c
changeset 11865 af91d564aa40
parent 11844 8e2ca40e07f3
child 11921 88a2982221ec
     1.1 --- a/src/core/android/SDL_android.c	Sun Feb 11 17:25:51 2018 -0800
     1.2 +++ b/src/core/android/SDL_android.c	Sun Feb 11 18:23:37 2018 -0800
     1.3 @@ -209,6 +209,7 @@
     1.4  /* method signatures */
     1.5  static jmethodID midGetNativeSurface;
     1.6  static jmethodID midSetActivityTitle;
     1.7 +static jmethodID midSetWindowStyle;
     1.8  static jmethodID midSetOrientation;
     1.9  static jmethodID midGetContext;
    1.10  static jmethodID midIsAndroidTV;
    1.11 @@ -302,6 +303,8 @@
    1.12                                  "getNativeSurface","()Landroid/view/Surface;");
    1.13      midSetActivityTitle = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
    1.14                                  "setActivityTitle","(Ljava/lang/String;)Z");
    1.15 +    midSetWindowStyle = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
    1.16 +                                "setWindowStyle","(Z)V");
    1.17      midSetOrientation = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
    1.18                                  "setOrientation","(IIZLjava/lang/String;)V");
    1.19      midGetContext = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
    1.20 @@ -332,7 +335,7 @@
    1.21      midGetDisplayDPI = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, "getDisplayDPI", "()Landroid/util/DisplayMetrics;");
    1.22  
    1.23      if (!midGetNativeSurface ||
    1.24 -       !midSetActivityTitle || !midSetOrientation || !midGetContext || !midIsAndroidTV || !midInputGetInputDeviceIds ||
    1.25 +       !midSetActivityTitle || !midSetWindowStyle || !midSetOrientation || !midGetContext || !midIsAndroidTV || !midInputGetInputDeviceIds ||
    1.26         !midSendMessage || !midShowTextInput || !midIsScreenKeyboardShown ||
    1.27         !midClipboardSetText || !midClipboardGetText || !midClipboardHasText ||
    1.28         !midOpenAPKExpansionInputStream || !midGetManifestEnvironmentVariables|| !midGetDisplayDPI) {
    1.29 @@ -907,6 +910,12 @@
    1.30      (*mEnv)->DeleteLocalRef(mEnv, jtitle);
    1.31  }
    1.32  
    1.33 +void Android_JNI_SetWindowStyle(SDL_bool fullscreen)
    1.34 +{
    1.35 +    JNIEnv *mEnv = Android_JNI_GetEnv();
    1.36 +    (*mEnv)->CallStaticVoidMethod(mEnv, mActivityClass, midSetWindowStyle, fullscreen ? 1 : 0);
    1.37 +}
    1.38 +
    1.39  void Android_JNI_SetOrientation(int w, int h, int resizable, const char *hint)
    1.40  {
    1.41      JNIEnv *mEnv = Android_JNI_GetEnv();