mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Compare commits
2 Commits
4b1ae72f59
...
dd19552f88
Author | SHA1 | Date | |
---|---|---|---|
|
dd19552f88 | ||
|
c077ad70fd |
@ -29,13 +29,12 @@ import {{.JavaPkg}}.ebitenmobileview.Renderer;
|
||||
import {{.JavaPkg}}.{{.PrefixLower}}.EbitenView;
|
||||
|
||||
class EbitenSurfaceView extends GLSurfaceView implements Renderer {
|
||||
// As GLSurfaceView can be recreated, the states must be static (#3097).
|
||||
static private boolean errored_ = false;
|
||||
static private boolean onceSurfaceCreated_ = false;
|
||||
static private boolean contextLost_ = false;
|
||||
|
||||
private class EbitenRenderer implements GLSurfaceView.Renderer {
|
||||
|
||||
private boolean errored_ = false;
|
||||
private boolean onceSurfaceCreated_ = false;
|
||||
private boolean contextLost_ = false;
|
||||
|
||||
@Override
|
||||
public void onDrawFrame(GL10 gl) {
|
||||
if (errored_) {
|
||||
@ -107,7 +106,7 @@ class EbitenSurfaceView extends GLSurfaceView implements Renderer {
|
||||
}
|
||||
|
||||
private void onContextLost() {
|
||||
Log.v("Go", "Kill the application due to a context lost");
|
||||
Log.e("Go", "The application was killed due to context loss");
|
||||
// TODO: Relaunch this application for better UX (#805).
|
||||
Runtime.getRuntime().exit(0);
|
||||
}
|
||||
|
3
run.go
3
run.go
@ -314,9 +314,6 @@ type RunGameOptions struct {
|
||||
// When StrictContextRestration is false, Ebitengine does nothing special to restore the context and
|
||||
// relies on the OS's behavior.
|
||||
//
|
||||
// As a side note, especially when StrictContextRestration is false, the activity's launch mode should
|
||||
// be singleInstance, or the activity no longer works correctly after the context is lost.
|
||||
//
|
||||
// The default (zero) value is false.
|
||||
StrictContextRestration bool
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user