Call System.gc() on track changes and game resets.
This causes a noticeable drop in memory usage in most cases. Also renamed the "crash" popup since the game doesn't necessarily crash. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -130,6 +130,7 @@ public class GamePauseMenu extends BasicGameState {
|
||||
MusicController.stop();
|
||||
MusicController.playAt(MusicController.getOsuFile().previewTime, true);
|
||||
SoundController.playSound(SoundEffect.MENUBACK);
|
||||
gameState.resetGameData();
|
||||
game.enterState(Opsu.STATE_SONGMENU, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
|
||||
} else {
|
||||
SoundController.playSound(SoundEffect.MENUBACK);
|
||||
@@ -173,6 +174,7 @@ public class GamePauseMenu extends BasicGameState {
|
||||
MusicController.pause(); // lose state
|
||||
MusicController.playAt(MusicController.getOsuFile().previewTime, true);
|
||||
SoundController.playSound(SoundEffect.MENUBACK);
|
||||
gameState.resetGameData();
|
||||
game.enterState(Opsu.STATE_SONGMENU, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user