SDL: more attempts to draw in the display cutout

This commit is contained in:
Sergii Pylypenko
2021-05-21 03:42:55 +03:00
parent c5d8e8b3c7
commit 21adbe6a1e
7 changed files with 31 additions and 4 deletions

View File

@@ -40,6 +40,7 @@ import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.app.KeyguardManager;
import android.graphics.Rect;
/**
* An implementation of SurfaceView that uses the dedicated surface for
@@ -1218,6 +1219,13 @@ public class GLSurfaceView_SDL extends SurfaceView implements SurfaceHolder.Call
synchronized (this) {
mWidth = w;
mHeight = h;
if (Globals.DrawInDisplayCutout) {
final Rect r = new Rect();
MainActivity.instance._videoLayout.getWindowVisibleDisplayFrame(r);
//mWidth = r.width();
//mHeight = r.height();
//Log.v("SDL", "GLSurfaceView_SDL::onWindowResize(): adjusted to display cutout: " + mWidth + "x" + mHeight);
}
mSizeChanged = true;
mRenderer.onWindowResize(w, h);
notify();