mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 00:29:50 -04:00
Move
This commit is contained in:
parent
39e250aa57
commit
189793020c
@ -77,11 +77,11 @@ 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);
|
||||||
|
|
||||||
@ -94,9 +94,9 @@ public class AWTCanvasView extends TextureView implements TextureView.SurfaceTex
|
|||||||
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