Closed GoogleCodeExporter closed 8 years ago
This isn't a bug.
This is a WIP, you MUST now override the back button and call finish yourself,
then its' fine. This is part of the fix for the onDetroy bug.
Original comment by rtaylor205@gmail.com
on 18 Aug 2010 at 7:33
it still have problem when exit game calling onLoadComplete again!
This is my code to call finish myself:
public boolean onKeyDown(int keyCode, KeyEvent event)
{
if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0)
{
finish();
return true;
}
return super.onKeyDown(keyCode, event);
}
so now I have to put these code:
Textures.load();
setScene(new SplashScene());
in onCreate function to avoid exception
Original comment by rayjun...@gmail.com
on 19 Aug 2010 at 1:18
I think the issue is that during RokonActivity.dispose() engineLoaded is being
set to false, but the RokonRenderer.onDrawFrame is being called over and over
by renderer, so it sets engineLoaded and calls the onLoadComplete and starts a
new Thread. Only since it is in the process of finishing, everything is
destroyed.
I'm not sure if this is the "right" fix, but I did this:
Index: RokonRenderer.java
===================================================================
--- RokonRenderer.java (revision 365)
+++ RokonRenderer.java (working copy)
@@ -48,7 +48,11 @@
GLHelper.setGL(gl);
Time.update();
-
+
+ if(!RokonActivity.engineCreated) {
+ return;
+ }
+
if(!RokonActivity.engineLoaded) {
RokonActivity.engineLoaded = true;
System.gc();
Original comment by jkoel...@gmail.com
on 30 Aug 2010 at 2:20
Original issue reported on code.google.com by
rayjun...@gmail.com
on 18 Aug 2010 at 2:39