This commit is contained in:
Ishan09811 2024-01-25 21:55:17 +05:30 committed by GitHub
commit 113e825898
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,6 +3,7 @@ package com.panda3ds.pandroid.view;
import android.content.Context;
import android.opengl.GLSurfaceView;
import android.os.Debug;
import android.view.SurfaceHolder;
import androidx.annotation.NonNull;
import com.panda3ds.pandroid.math.Vector2;
@ -25,7 +26,9 @@ public class PandaGlSurfaceView extends GLSurfaceView implements TouchScreenNode
setRenderer(renderer);
}
public ConsoleRenderer getRenderer() { return renderer; }
public ConsoleRenderer getRenderer() {
return renderer;
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
@ -49,7 +52,7 @@ public class PandaGlSurfaceView extends GLSurfaceView implements TouchScreenNode
public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) {
super.onSurfaceChanged(holder, format, width, height);
// Update the dimensions in the renderer when the surface changes
renderer.onSurfaceChanged(newWidth, newHeight);
renderer.onSurfaceChanged(width, height);
}
@Override