mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-14 23:28:52 -04:00
Move
This commit is contained in:
parent
39e250aa57
commit
189793020c
@ -77,14 +77,14 @@ public class AWTCanvasView extends TextureView implements TextureView.SurfaceTex
|
|||||||
private Surface mSurface;
|
private Surface mSurface;
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
Canvas canvas;
|
||||||
Canvas canvas;
|
mSurface = new Surface(getSurfaceTexture());
|
||||||
mSurface = new Surface(getSurfaceTexture());
|
|
||||||
|
|
||||||
while (!mIsDestroyed) {
|
while (!mIsDestroyed && mSurface.isValid()) {
|
||||||
|
try {
|
||||||
canvas = mSurface.lockCanvas(null);
|
canvas = mSurface.lockCanvas(null);
|
||||||
canvas.drawRGB(0, 0, 0);
|
canvas.drawRGB(0, 0, 0);
|
||||||
|
|
||||||
if (!attached) {
|
if (!attached) {
|
||||||
attached = CallbackBridge.nativeAttachThreadToOther(true, MainActivity.isInputStackCall);
|
attached = CallbackBridge.nativeAttachThreadToOther(true, MainActivity.isInputStackCall);
|
||||||
}
|
}
|
||||||
@ -92,11 +92,11 @@ public class AWTCanvasView extends TextureView implements TextureView.SurfaceTex
|
|||||||
drawing = JREUtils.renderAWTScreenFrame(canvas, mWidth, mHeight);
|
drawing = JREUtils.renderAWTScreenFrame(canvas, mWidth, mHeight);
|
||||||
}
|
}
|
||||||
canvas.drawText("FPS: " + fps() + ", attached=" + attached + ", drawing=" + drawing, 50, 50, fpsPaint);
|
canvas.drawText("FPS: " + fps() + ", attached=" + attached + ", drawing=" + drawing, 50, 50, fpsPaint);
|
||||||
|
|
||||||
mSurface.unlockCanvasAndPost(canvas);
|
mSurface.unlockCanvasAndPost(canvas);
|
||||||
|
} catch (Throwable th) {
|
||||||
|
th.printStackTrace();
|
||||||
}
|
}
|
||||||
} catch (Throwable th) {
|
|
||||||
Tools.showError(getContext(), th, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user