mirror of https://github.com/libsdl-org/SDL.git
Fixed running on Android 10 and older (thanks @AntTheAlchemist!)
This commit is contained in:
parent
c601120883
commit
31730bef1a
|
|
@ -194,16 +194,15 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||||
// Window inset
|
// Window inset
|
||||||
@Override
|
@Override
|
||||||
public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) {
|
public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) {
|
||||||
Insets combined = insets.getInsets(WindowInsets.Type.statusBars() |
|
if (Build.VERSION.SDK_INT >= 30 /* Android 11 (R) */) {
|
||||||
WindowInsets.Type.navigationBars() |
|
Insets combined = insets.getInsets(WindowInsets.Type.systemBars() |
|
||||||
WindowInsets.Type.captionBar() |
|
WindowInsets.Type.systemGestures() |
|
||||||
WindowInsets.Type.systemGestures() |
|
WindowInsets.Type.mandatorySystemGestures() |
|
||||||
WindowInsets.Type.mandatorySystemGestures() |
|
WindowInsets.Type.tappableElement() |
|
||||||
WindowInsets.Type.tappableElement() |
|
WindowInsets.Type.displayCutout());
|
||||||
WindowInsets.Type.displayCutout() |
|
|
||||||
WindowInsets.Type.systemOverlays());
|
|
||||||
|
|
||||||
SDLActivity.onNativeInsetsChanged(combined.left, combined.right, combined.top, combined.bottom);
|
SDLActivity.onNativeInsetsChanged(combined.left, combined.right, combined.top, combined.bottom);
|
||||||
|
}
|
||||||
|
|
||||||
// Pass these to any child views in case they need them
|
// Pass these to any child views in case they need them
|
||||||
return insets;
|
return insets;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue