Revision b4cc083b
Added by Leszek Koltunski about 8 years ago
src/main/java/org/distorted/examples/matrix3d/Matrix3DRenderer.java | ||
---|---|---|
81 | 81 |
|
82 | 82 |
public void onSurfaceChanged(GL10 glUnused, int width, int height) |
83 | 83 |
{ |
84 |
mQueues.abortEffects(EffectTypes.MATRIX); |
|
85 |
|
|
86 | 84 |
mWidth = width; |
87 | 85 |
mHeight= height; |
88 | 86 |
|
src/main/java/org/distorted/examples/matrix3d/Matrix3DSurfaceView.java | ||
---|---|---|
52 | 52 |
return mRenderer; |
53 | 53 |
} |
54 | 54 |
|
55 |
} |
|
55 |
}
|
|
56 | 56 |
|
src/main/java/org/distorted/examples/save/SaveActivity.java | ||
---|---|---|
43 | 43 |
}; |
44 | 44 |
|
45 | 45 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
46 |
// Checks if the app has permission to write to device storage |
|
47 |
// If the app does not has permission then the user will be prompted to grant permissions
|
|
46 |
// Checks if the app has permission to write to device storage.
|
|
47 |
// If not, the user will be prompted to grant ut.
|
|
48 | 48 |
|
49 | 49 |
private void verifyStoragePermissions() |
50 | 50 |
{ |
src/main/java/org/distorted/examples/save/SaveWorkerThread.java | ||
---|---|---|
65 | 65 |
|
66 | 66 |
static void create(Activity act) |
67 | 67 |
{ |
68 |
mWeakAct = new WeakReference(act); |
|
68 |
mWeakAct = new WeakReference<>(act);
|
|
69 | 69 |
|
70 | 70 |
if( mThis==null ) |
71 | 71 |
{ |
src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java | ||
---|---|---|
144 | 144 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
145 | 145 |
|
146 | 146 |
public void onSurfaceChanged(GL10 glUnused, int width, int height) |
147 |
{ |
|
148 |
Distorted.onSurfaceChanged(width, height); |
|
147 |
{ |
|
148 |
mScreenQueue.abortAllEffects(); |
|
149 |
mGFFAQueue.abortAllEffects(); |
|
150 |
mLogoQueue.abortAllEffects(); |
|
151 |
mCrawlQueue.abortAllEffects(); |
|
152 |
mCrawlBackgroundQueue.abortAllEffects(); |
|
153 |
|
|
154 |
for(int i=0; i<NUM_STARS; i++) mStarQueue[i].abortAllEffects(); |
|
155 |
|
|
149 | 156 |
setupScreen(width,height); |
157 |
|
|
158 |
Distorted.onSurfaceChanged(width, height); |
|
150 | 159 |
} |
151 | 160 |
|
152 | 161 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
156 | 165 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
157 | 166 |
|
158 | 167 |
setupBitmaps(); |
159 |
|
|
168 |
|
|
160 | 169 |
try |
161 | 170 |
{ |
162 | 171 |
Distorted.onSurfaceCreated(mView.getContext()); |
... | ... | |
347 | 356 |
if( objectID == gffaID ) |
348 | 357 |
{ |
349 | 358 |
mRoot.detach(mGFFAQueue); |
350 |
mGFFAQueue.delete();
|
|
359 |
mGFFAQueue.abortAllEffects();
|
|
351 | 360 |
mGFFATexture.markForDeletion(); |
352 | 361 |
|
353 | 362 |
int screenW=mScreenTexture.getWidth(); |
... | ... | |
373 | 382 |
else if( objectID==logoID ) |
374 | 383 |
{ |
375 | 384 |
mRoot.detach(mLogoQueue); |
376 |
mLogoQueue.delete();
|
|
385 |
mLogoQueue.abortAllEffects();
|
|
377 | 386 |
mLogoTexture.markForDeletion(); |
378 | 387 |
|
379 | 388 |
int crawlW = mCrawlTexture.getWidth(); |
... | ... | |
406 | 415 |
{ |
407 | 416 |
mRoot.detach(mBackground); |
408 | 417 |
mBackground.detach(mCrawlQueue); |
409 |
mCrawlQueue.delete();
|
|
418 |
mCrawlQueue.abortAllEffects();
|
|
410 | 419 |
mCrawlTexture.markForDeletion(); |
411 |
mCrawlBackgroundQueue.delete();
|
|
420 |
mCrawlBackgroundQueue.abortAllEffects();
|
|
412 | 421 |
mCrawlBackgroundTexture.markForDeletion(); |
413 | 422 |
} |
414 | 423 |
} |
Also available in: Unified diff
Some improvements for StarWars's behaviour after onPause(), but it doesn't really work yet.
Remaining 'onPause-buggy' apps: StarWars, Save.