v0.9.1a: more android lifecycle adjustments, should fix various bugs
This commit is contained in:
parent
84d3029b04
commit
fef273cfc3
|
@ -141,6 +141,12 @@ public class Game implements ApplicationListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render() {
|
public void render() {
|
||||||
|
//prevents weird rare cases where the app is running twice
|
||||||
|
if (instance != this){
|
||||||
|
finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
NoosaScript.get().resetCamera();
|
NoosaScript.get().resetCamera();
|
||||||
NoosaScriptNoLighting.get().resetCamera();
|
NoosaScriptNoLighting.get().resetCamera();
|
||||||
Gdx.gl.glDisable(Gdx.gl.GL_SCISSOR_TEST);
|
Gdx.gl.glDisable(Gdx.gl.GL_SCISSOR_TEST);
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
android:label="${appName}"
|
android:label="${appName}"
|
||||||
android:name=".AndroidGame"
|
android:name=".AndroidGame"
|
||||||
android:screenOrientation="nosensor"
|
android:screenOrientation="nosensor"
|
||||||
android:configChanges="keyboard|keyboardHidden|orientation">
|
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize">
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
|
@ -124,17 +124,6 @@ public class AndroidGame extends AndroidApplication {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
//LibGDX itself doesn't clear these in every case, so we do it ourselves to be sure
|
|
||||||
graphics.clearManagedCaches();
|
|
||||||
audio.dispose();
|
|
||||||
if (instance == this) {
|
|
||||||
instance = null;
|
|
||||||
}
|
|
||||||
super.onDestroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
//do nothing, game should catch all back presses
|
//do nothing, game should catch all back presses
|
||||||
|
|
Loading…
Reference in New Issue
Block a user