*Fix for loading BGMs of USB Devices

This commit is contained in:
dimok321 2010-01-08 21:50:57 +00:00
parent 1d9b8576e3
commit f169773cd0
4 changed files with 16 additions and 11 deletions

View File

@ -2,8 +2,8 @@
<app version="1"> <app version="1">
<name> USB Loader GX</name> <name> USB Loader GX</name>
<coder>USB Loader GX Team</coder> <coder>USB Loader GX Team</coder>
<version>1.0 r891</version> <version>1.0 r892</version>
<release_date>201001072053</release_date> <release_date>201001081936</release_date>
<short_description>Loads games from USB-devices</short_description> <short_description>Loads games from USB-devices</short_description>
<long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times. <long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times.
The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller. The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller.

View File

@ -18,7 +18,7 @@ GuiBGM::GuiBGM(const u8 *s, int l, int v)
//shouldn't be needed but //shouldn't be needed but
//fixes some kind of weird bug in ogg system //fixes some kind of weird bug in ogg system
GuiSound::Load(bg_music_ogg, bg_music_ogg_size, true); GuiSound::Load(s, l, v);
} }
GuiBGM::~GuiBGM() GuiBGM::~GuiBGM()

View File

@ -172,9 +172,6 @@ static void * UpdateGUI (void *arg) {
break; break;
} }
} }
return NULL; return NULL;
} }
@ -284,15 +281,17 @@ int MainMenu(int menu) {
bgImg = new GuiImage(background); bgImg = new GuiImage(background);
mainWindow->Append(bgImg); mainWindow->Append(bgImg);
ResumeGui();
bgMusic = new GuiBGM(bg_music_ogg, bg_music_ogg_size, Settings.volume); bgMusic = new GuiBGM(bg_music_ogg, bg_music_ogg_size, Settings.volume);
bgMusic->SetLoop(Settings.musicloopmode); //loop music bgMusic->SetLoop(Settings.musicloopmode); //loop music
if(strstr(Settings.ogg_path, "USB:/") == 0) //usb is not detected at this point yet
{
bgMusic->Load(Settings.ogg_path); bgMusic->Load(Settings.ogg_path);
bgMusic->Play(); bgMusic->Play();
}
ResumeGui();
while (currentMenu != MENU_EXIT) { while (currentMenu != MENU_EXIT) {
bgMusic->SetVolume(Settings.volume);
switch (currentMenu) switch (currentMenu)
{ {

View File

@ -164,6 +164,12 @@ static void * CheckDevices (void *arg)
checkthreadState = 1; checkthreadState = 1;
LWP_SetThreadPriority(LWP_GetSelf(), 0); LWP_SetThreadPriority(LWP_GetSelf(), 0);
if(strstr(Settings.ogg_path, "USB:/") != 0)
{
bgMusic->Load(Settings.ogg_path);
bgMusic->Play();
}
} }
} }