ppy / osu-framework

A game framework written with osu! in mind.
MIT License
1.67k stars 419 forks source link

Fix Android safe area #6363

Closed hwsmm closed 3 months ago

hwsmm commented 3 months ago

SDL3 started to provide safe area, and it uses setOnApplyWindowInsetsListener which overrides View.onApplyWindowInsets with View.OnApplyWindowInsetsListener.onApplyWindowInsets.

This PR makes AndroidGameSurface override View.OnApplyWindowInsetsListener.onApplyWindowInsets instead, and removes LayoutInDisplayCutoutMode as it is now set in SDL side.

I also tried using SDL-provided safe area, but it doesn't seem to work like our current implementation, so I think we can still keep ours for now.