mirror of https://github.com/encounter/SDL.git
SDL Android fullscreen code extensively tested on Steam Link with no issues reported
This commit is contained in:
parent
08de74ec49
commit
12ff19c035
|
@ -480,18 +480,16 @@ public class SDLActivity extends Activity {
|
||||||
// This version of Android doesn't support the immersive fullscreen mode
|
// This version of Android doesn't support the immersive fullscreen mode
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* This needs more testing, per bug 4096 - Enabling fullscreen on Android causes the app to toggle fullscreen mode continuously in a loop
|
|
||||||
***
|
|
||||||
if (context instanceof Activity) {
|
if (context instanceof Activity) {
|
||||||
Window window = ((Activity) context).getWindow();
|
Window window = ((Activity) context).getWindow();
|
||||||
if (window != null) {
|
if (window != null) {
|
||||||
if ((msg.obj instanceof Integer) && (((Integer) msg.obj).intValue() != 0)) {
|
if ((msg.obj instanceof Integer) && (((Integer) msg.obj).intValue() != 0)) {
|
||||||
int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
int flags = View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
|
|
||||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
|
||||||
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
|
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
|
||||||
View.SYSTEM_UI_FLAG_FULLSCREEN |
|
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY |
|
||||||
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
|
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||||
|
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
|
||||||
|
View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
|
||||||
window.getDecorView().setSystemUiVisibility(flags);
|
window.getDecorView().setSystemUiVisibility(flags);
|
||||||
window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||||
} else {
|
} else {
|
||||||
|
@ -503,7 +501,6 @@ public class SDLActivity extends Activity {
|
||||||
} else {
|
} else {
|
||||||
Log.e(TAG, "error handling message, getContext() returned no Activity");
|
Log.e(TAG, "error handling message, getContext() returned no Activity");
|
||||||
}
|
}
|
||||||
***/
|
|
||||||
break;
|
break;
|
||||||
case COMMAND_TEXTEDIT_HIDE:
|
case COMMAND_TEXTEDIT_HIDE:
|
||||||
if (mTextEdit != null) {
|
if (mTextEdit != null) {
|
||||||
|
|
Loading…
Reference in New Issue