Minor bug fixes.

- Fixed null pointer in "Main Menu" state if no tracks loaded. (since b0c0b44)
- Fixed "keyOsuLeft" and "keyOsuRight" writing KEY_NONE to configuration file on first run (instead of default values).

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han 2014-07-18 21:33:07 -04:00
parent c0870afb77
commit 834682a6ca
2 changed files with 3 additions and 3 deletions

View File

@ -188,7 +188,7 @@ public class MainMenu extends BasicGameState {
g.setColor(Utils.COLOR_BLACK_ALPHA);
g.fillRoundRect(width - 168, 54, 148, 5, 4);
g.setColor(Color.white);
if (!MusicController.isTrackLoading())
if (!MusicController.isTrackLoading() && osu != null)
g.fillRoundRect(width - 168, 54,
148f * MusicController.getPosition() / osu.endTime, 5, 4);

View File

@ -1433,9 +1433,9 @@ public class Options extends BasicGameState {
writer.newLine();
writer.write(String.format("DisableSound = %b", disableSound));
writer.newLine();
writer.write(String.format("keyOsuLeft = %s", Keyboard.getKeyName(keyLeft)));
writer.write(String.format("keyOsuLeft = %s", Keyboard.getKeyName(getGameKeyLeft())));
writer.newLine();
writer.write(String.format("keyOsuRight = %s", Keyboard.getKeyName(keyRight)));
writer.write(String.format("keyOsuRight = %s", Keyboard.getKeyName(getGameKeyRight())));
writer.newLine();
writer.write(String.format("DimLevel = %d", backgroundDim));
writer.newLine();