From 218b9d88f4ec1d15a46697dd7c5e835660020f99 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 23 Mar 2013 11:17:31 +0100 Subject: NEWT/Android: Fix suspense regression of commit d514ecbf052d013ea8c0982c490757678075a9ea Explicit win.destroy() shall only be called at activity.onDestroy(), - GLStateKeeper preservation is marked at pause, - and the Window's surfaceDestroyed() will also issue destroy() - so it's safe Reason: On Suspense (or power button), application is paused _without_ surfaceDestruction ! --- src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java b/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java index 2ea7a9d84..ab8fc8ad0 100644 --- a/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java +++ b/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java @@ -200,6 +200,7 @@ public class NewtBaseActivity extends Activity { @Override public void glStateRestored(GLStateKeeper glsk) { Log.d(MD.TAG, "GLStateKeeper Restored: 0x"+Integer.toHexString(glsk.hashCode())); + startAnimation(true); } }; @@ -380,12 +381,11 @@ public class NewtBaseActivity extends Activity { } } } - Log.d(MD.TAG, "GLStateKeeper.Preserving: Total "+glAutoDrawables.size()+", OK "+ok+", Fail "+fail); + Log.d(MD.TAG, "GLStateKeeper.Mark2Preserve: Total "+glAutoDrawables.size()+", OK "+ok+", Fail "+fail); } for(int i=0; i