# HG changeset patch # User nkeynes # Date 1332284501 -36000 # Node ID f727227cc4f819b3b711386f402871cb9bf406f9 # Parent e20a691670934c0d23377dacdcf6c727070eb9a9 Surface management is actually already being taken care of - don't try to duplicate in onPause/onResume --- a/src/gui_android.c Tue Mar 20 17:54:58 2012 +1000 +++ b/src/gui_android.c Wed Mar 21 09:01:41 2012 +1000 @@ -86,6 +86,7 @@ { struct surface_info *surface = (struct surface_info *)data; video_egl_set_window(surface->win, surface->width, surface->height, surface->format); + INFO( "set_surface" ); return 0; } @@ -94,16 +95,12 @@ if( dreamcast_is_running() ) { dreamcast_stop(); } - video_egl_clear_window(); INFO( "Paused" ); return 0; } int android_do_resume(void *data) { - struct surface_info *surface = (struct surface_info *)data; - if( surface->win != NULL ) - video_egl_set_window(surface->win, surface->width, surface->height, surface->format); INFO( "Resumed" ); return 0; } @@ -112,9 +109,13 @@ { struct surface_info *surface = (struct surface_info *)data; - android_do_pause(data); /* If we haven't already stopped, stop now */ + if( dreamcast_is_running() ) { + dreamcast_stop(); /* Should already be stopped, but just in case */ + } + video_egl_clear_window(); ANativeWindow_release(surface->win); surface->win = NULL; + INFO( "clear_surface" ); return 0; }