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;
|
||||
@Override
|
||||
public void run() {
|
||||
Canvas canvas;
|
||||
mSurface = new Surface(getSurfaceTexture());
|
||||
try {
|
||||
Canvas canvas;
|
||||
mSurface = new Surface(getSurfaceTexture());
|
||||
|
||||
while (!mIsDestroyed) {
|
||||
canvas = mSurface.lockCanvas(null);
|
||||
if (!attached) {
|
||||
attached = CallbackBridge.nativeAttachThreadToOther(true, MainActivity.isInputStackCall);
|
||||
while (!mIsDestroyed) {
|
||||
canvas = mSurface.lockCanvas(null);
|
||||
canvas.drawRGB(0, 0, 0);
|
||||
|
||||
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) {
|
||||
drawing = JREUtils.renderAWTScreenFrame(canvas, mWidth, mHeight);
|
||||
}
|
||||
canvas.drawText("FPS: " + fps() + ", drawing=" + drawing, 10, 10, fpsPaint);
|
||||
mSurface.unlockCanvasAndPost(canvas);
|
||||
} catch (Throwable th) {
|
||||
Tools.showError(getContext(), th, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue