Fixed screen top cropped in non-immersive mode
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user