From 082d0ff8dd650c08939f885ec019e8a9cdbb0193 Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Sat, 20 Apr 2013 19:24:04 +0000 Subject: [PATCH] -fixed not working music playback from the plugin if no wiiflow music folder with music is present -changed version to beta 4.1.2 (whoops) --- source/defines.h | 2 +- source/music/MusicPlayer.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/source/defines.h b/source/defines.h index 477d17ca..796df0a4 100644 --- a/source/defines.h +++ b/source/defines.h @@ -1,5 +1,5 @@ #define APP_NAME "WiiFlow" -#define APP_VERSION "Beta 4.1.1" +#define APP_VERSION "Beta 4.1.2" #define APPDATA_DIR "wiiflow" #define APPDATA_DIR2 "apps/wiiflow" diff --git a/source/music/MusicPlayer.cpp b/source/music/MusicPlayer.cpp index 51538121..907087cd 100644 --- a/source/music/MusicPlayer.cpp +++ b/source/music/MusicPlayer.cpp @@ -143,6 +143,13 @@ void Musicplayer::LoadCurrentFile() void Musicplayer::LoadFile(const char *name, bool display_change) { + if(FileNames.empty()) + FileNames.push_back(PLUGIN_DOMAIN); + else if(FileNames.size() == 1 && strcmp(name, PLUGIN_DOMAIN) == 0) + { + Cleanup(); + return; + } MusicFile.Load(name); SetVolume(CurrentVolume); MusicFile.Play();