From 49f454a21fd8611f11fd90762dcdfb14330a1dfa Mon Sep 17 00:00:00 2001 From: Recrown Date: Mon, 30 Oct 2017 12:43:19 -0500 Subject: [PATCH] previous button now loops to the end if at the beginning --- core/src/zero1hd/rhythmbullet/RhythmBullet.java | 5 +++++ core/src/zero1hd/rhythmbullet/audio/SongListController.java | 2 +- .../rhythmbullet/graphics/ui/pages/MusicSelectionPage.java | 3 --- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/src/zero1hd/rhythmbullet/RhythmBullet.java b/core/src/zero1hd/rhythmbullet/RhythmBullet.java index 47eddbb..a40ba40 100755 --- a/core/src/zero1hd/rhythmbullet/RhythmBullet.java +++ b/core/src/zero1hd/rhythmbullet/RhythmBullet.java @@ -1,5 +1,8 @@ package zero1hd.rhythmbullet; +import java.util.logging.Level; +import java.util.logging.Logger; + import com.badlogic.gdx.Application; import com.badlogic.gdx.Game; import com.badlogic.gdx.Gdx; @@ -55,7 +58,9 @@ public class RhythmBullet extends Game { @Override public void create() { + Logger.getLogger("org.jaudiotagger").setLevel(Level.OFF); Gdx.app.setLogLevel(Application.LOG_DEBUG); + prefs = Gdx.app.getPreferences("PolyJet_Preferences"); if (getPrefs().getBoolean("fullscreen", true)) { diff --git a/core/src/zero1hd/rhythmbullet/audio/SongListController.java b/core/src/zero1hd/rhythmbullet/audio/SongListController.java index cfa48f8..ed237b4 100755 --- a/core/src/zero1hd/rhythmbullet/audio/SongListController.java +++ b/core/src/zero1hd/rhythmbullet/audio/SongListController.java @@ -111,7 +111,7 @@ public class SongListController extends Observable implements OnCompletionListen } } if (currentPlaybackID < 0) { - currentPlaybackID = 0; + currentPlaybackID = songList.getAmountOfSongs(); } this.mdp = songList.getMusicInfoFromIndex(currentPlaybackID); if (mdp == null) { diff --git a/core/src/zero1hd/rhythmbullet/graphics/ui/pages/MusicSelectionPage.java b/core/src/zero1hd/rhythmbullet/graphics/ui/pages/MusicSelectionPage.java index 57f81a6..cb5c35c 100755 --- a/core/src/zero1hd/rhythmbullet/graphics/ui/pages/MusicSelectionPage.java +++ b/core/src/zero1hd/rhythmbullet/graphics/ui/pages/MusicSelectionPage.java @@ -2,8 +2,6 @@ package zero1hd.rhythmbullet.graphics.ui.pages; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import java.util.logging.Level; -import java.util.logging.Logger; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Preferences; @@ -106,7 +104,6 @@ public class MusicSelectionPage extends Page { } public void refresh() { - Logger.getLogger("org.jaudiotagger").setLevel(Level.OFF); songTable.clear(); selectables.clear(); for (int i = 0; i < selectables.size; i++) {