mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-21 09:01:56 -07:00
Changes
- [Mod installer] Fix crash when put t background. - Tools.java: replace tabs with 4-spaces
This commit is contained in:
parent
ab2e9e68b1
commit
39e250aa57
2 changed files with 728 additions and 736 deletions
|
|
@ -77,19 +77,26 @@ public class AWTCanvasView extends TextureView implements TextureView.SurfaceTex
|
||||||
private Surface mSurface;
|
private Surface mSurface;
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Canvas canvas;
|
try {
|
||||||
mSurface = new Surface(getSurfaceTexture());
|
Canvas canvas;
|
||||||
|
mSurface = new Surface(getSurfaceTexture());
|
||||||
|
|
||||||
while (!mIsDestroyed) {
|
while (!mIsDestroyed) {
|
||||||
canvas = mSurface.lockCanvas(null);
|
canvas = mSurface.lockCanvas(null);
|
||||||
if (!attached) {
|
canvas.drawRGB(0, 0, 0);
|
||||||
attached = CallbackBridge.nativeAttachThreadToOther(true, MainActivity.isInputStackCall);
|
|
||||||
|
if (!attached) {
|
||||||
|
attached = CallbackBridge.nativeAttachThreadToOther(true, MainActivity.isInputStackCall);
|
||||||
|
}
|
||||||
|
if (attached) {
|
||||||
|
drawing = JREUtils.renderAWTScreenFrame(canvas, mWidth, mHeight);
|
||||||
|
}
|
||||||
|
canvas.drawText("FPS: " + fps() + ", attached=" + attached + ", drawing=" + drawing, 50, 50, fpsPaint);
|
||||||
|
|
||||||
|
mSurface.unlockCanvasAndPost(canvas);
|
||||||
}
|
}
|
||||||
if (attached) {
|
} catch (Throwable th) {
|
||||||
drawing = JREUtils.renderAWTScreenFrame(canvas, mWidth, mHeight);
|
Tools.showError(getContext(), th, true);
|
||||||
}
|
|
||||||
canvas.drawText("FPS: " + fps() + ", drawing=" + drawing, 10, 10, fpsPaint);
|
|
||||||
mSurface.unlockCanvasAndPost(canvas);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue