Fixed screen top cropped in non-immersive mode

This commit is contained in:
Sergii Pylypenko
2015-05-14 21:04:07 +03:00
parent 3f17ffcf38
commit f527b89955
3 changed files with 3 additions and 3 deletions

View File

@@ -1337,7 +1337,7 @@ abstract class DimSystemStatusBar
// Immersive mode, I already hear curses when system bar reappears mid-game from the slightest swipe at the bottom of the screen
view.setSystemUiVisibility(android.view.View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | android.view.View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | android.view.View.SYSTEM_UI_FLAG_FULLSCREEN);
else
view.setSystemUiVisibility(android.view.View.STATUS_BAR_HIDDEN);
view.setSystemUiVisibility(android.view.View.SYSTEM_UI_FLAG_LOW_PROFILE);
}
}
private static class DimSystemStatusBarDummy extends DimSystemStatusBar

View File

@@ -625,7 +625,7 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
int ww = w - w % 2;
int hh = h - h % 2;
View topView = context.getWindow().peekDecorView();
if (topView != null)
if (topView != null && Globals.ImmersiveMode)
{
ww = topView.getWidth() - topView.getWidth() % 2;
hh = topView.getHeight() - topView.getHeight() % 2;