Small memory optimization: reuse audio File objects in song groups.
Each song group references the same audio file probably 100% of the time, so don't create duplicate objects.
Also, follow-up to 3b13cc7: the up/down arrow keys now change global volume in the main menu and game states (in addition to the scroll wheel).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -644,6 +644,12 @@ public class Game extends BasicGameState {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Input.KEY_UP:
|
||||
Utils.changeVolume(1);
|
||||
break;
|
||||
case Input.KEY_DOWN:
|
||||
Utils.changeVolume(-1);
|
||||
break;
|
||||
case Input.KEY_F12:
|
||||
Utils.takeScreenShot();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user