SDL: more attempts to draw in the display cutout
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user