Enabled application restarts.
- Pressing Ctrl+Shift+F5 in the options menu restarts the game. Beatmaps and sounds are not reloaded. - Use GameContainer.setForceExit(false) to trigger a restart after exiting. Other changes: - Fixed general issues with track pausing/pause states. - Store all background images loaded in OsuFiles in a static hash table, instead of in individual objects. This allows easier access to the allocated memory. - Only delete OSZ files if they were unzipped. (They were previously deleted in all cases.) - Moved more images (mods, playfield, lighting) into GameImage. - Moved OsuHitObject initialization inside Utils. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -135,6 +135,7 @@ public class MusicController {
|
||||
if (trackExists()) {
|
||||
setVolume(Options.getMusicVolume() * Options.getMasterVolume());
|
||||
player.setPosition(position / 1000f);
|
||||
pauseTime = 0f;
|
||||
if (loop)
|
||||
player.loop();
|
||||
else
|
||||
@@ -237,6 +238,8 @@ public class MusicController {
|
||||
public static void stop() {
|
||||
if (isPlaying())
|
||||
player.stop();
|
||||
if (trackExists())
|
||||
pauseTime = 0f;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -400,7 +403,7 @@ public class MusicController {
|
||||
|
||||
player = null;
|
||||
} catch (Exception e) {
|
||||
ErrorHandler.error("Failed to destroy OpenAL.", e, false);
|
||||
ErrorHandler.error("Failed to destroy OpenAL.", e, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user