Revision 0df17fad
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/library/EffectQueue.java | ||
---|---|---|
195 | 195 |
} |
196 | 196 |
|
197 | 197 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
198 |
|
|
199 |
synchronized int abortAll() |
|
198 |
// we do want to notify Listeners if they called 'abortAll' themselves but don't want to notify |
|
199 |
// them if it is the library itself which is releasing resources. |
|
200 |
|
|
201 |
synchronized int abortAll(boolean notify) |
|
200 | 202 |
{ |
201 | 203 |
int ret = mNumEffects; |
202 | 204 |
long removedID; |
... | ... | |
208 | 210 |
mInter[1][i] = null; |
209 | 211 |
mInter[2][i] = null; |
210 | 212 |
|
211 |
removedID = mID[i]; |
|
212 |
removedType= mType[i]; |
|
213 |
|
|
214 |
for(int j=0; j<mNumListeners; j++) |
|
215 |
EffectMessageSender.newMessage( mListeners.elementAt(j), |
|
216 |
EffectMessage.EFFECT_REMOVED, |
|
217 |
(removedID<<EffectTypes.LENGTH)+EffectNames.getType(removedType).type, |
|
218 |
removedType, |
|
219 |
mBitmapID, |
|
220 |
null); |
|
213 |
if( notify ) |
|
214 |
{ |
|
215 |
removedID = mID[i]; |
|
216 |
removedType= mType[i]; |
|
217 |
|
|
218 |
for(int j=0; j<mNumListeners; j++) |
|
219 |
EffectMessageSender.newMessage( mListeners.elementAt(j), |
|
220 |
EffectMessage.EFFECT_REMOVED, |
|
221 |
(removedID<<EffectTypes.LENGTH)+EffectNames.getType(removedType).type, |
|
222 |
removedType, |
|
223 |
mBitmapID, |
|
224 |
null); |
|
225 |
} |
|
221 | 226 |
} |
222 | 227 |
|
223 | 228 |
mNumEffects= 0; |
Also available in: Unified diff
- Javadoc for EffectNames
- make Matrix effects consistent with the rest (center of effect as last parameter!)
- bugfix for yesterday's bugfix (we only want to send 'EFFECT_REMOVED' messages if it was really the Application that called 'abortAll' and not when we are cleaning up everything)