Project

General

Profile

« Previous | Next » 

Revision 8d98b65f

Added by Leszek Koltunski over 2 years ago

Move destroying most of statics from onDestroy() earlier, to onPause().

Reason: doing this in onDestroy() is too late, because when we have two activities, and switch between them, first the ending's Activity onPause() is called, then the starting Activity's onResume, then it's onSurfaceCreated(), then we insert all the effects, and only then the ending Activity onDestroy() gets fired off - and this might destroy the already enabled effects, like for example the Programs of the Postprocessing effects.

View differences:

src/main/java/org/distorted/library/main/InternalOutputSurface.java
207 207

  
208 208
///////////////////////////////////////////////////////////////////////////////////////////////////
209 209

  
210
  static synchronized void onDestroy()
210
  static synchronized void onPause()
211 211
    {
212 212
    for (int j=0; j<EffectQuality.LENGTH; j++)
213 213
      if( mBuffer[j]!=null )

Also available in: Unified diff