Only load image resources when needed.
- Stop loading all images on startup. - Game images are preloaded before the song starts. - Destroy skin images immediately after finishing a beatmap, potentially saving lots of memory. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -581,6 +581,9 @@ public class SongMenu extends BasicGameState {
|
||||
// stop playing the theme song
|
||||
if (MusicController.isThemePlaying() && focusNode != null)
|
||||
MusicController.play(focusNode.osuFiles.get(focusNode.osuFileIndex), true);
|
||||
|
||||
// destroy skin images, if any
|
||||
GameImage.destroySkinImages();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user