mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-12-25 19:21:53 +01:00
*Fix for loading BGMs of USB Devices
This commit is contained in:
parent
1d9b8576e3
commit
f169773cd0
@ -2,8 +2,8 @@
|
||||
<app version="1">
|
||||
<name> USB Loader GX</name>
|
||||
<coder>USB Loader GX Team</coder>
|
||||
<version>1.0 r891</version>
|
||||
<release_date>201001072053</release_date>
|
||||
<version>1.0 r892</version>
|
||||
<release_date>201001081936</release_date>
|
||||
<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.
|
||||
The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller.
|
||||
|
@ -18,7 +18,7 @@ GuiBGM::GuiBGM(const u8 *s, int l, int v)
|
||||
|
||||
//shouldn't be needed but
|
||||
//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()
|
||||
|
@ -172,9 +172,6 @@ static void * UpdateGUI (void *arg) {
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@ -284,15 +281,17 @@ int MainMenu(int menu) {
|
||||
bgImg = new GuiImage(background);
|
||||
mainWindow->Append(bgImg);
|
||||
|
||||
bgMusic = new GuiBGM(bg_music_ogg, bg_music_ogg_size, Settings.volume);
|
||||
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->Play();
|
||||
}
|
||||
ResumeGui();
|
||||
|
||||
bgMusic = new GuiBGM(bg_music_ogg, bg_music_ogg_size, Settings.volume);
|
||||
bgMusic->SetLoop(Settings.musicloopmode); //loop music
|
||||
bgMusic->Load(Settings.ogg_path);
|
||||
bgMusic->Play();
|
||||
|
||||
while (currentMenu != MENU_EXIT) {
|
||||
bgMusic->SetVolume(Settings.volume);
|
||||
|
||||
switch (currentMenu)
|
||||
{
|
||||
|
@ -164,6 +164,12 @@ static void * CheckDevices (void *arg)
|
||||
checkthreadState = 1;
|
||||
|
||||
LWP_SetThreadPriority(LWP_GetSelf(), 0);
|
||||
|
||||
if(strstr(Settings.ogg_path, "USB:/") != 0)
|
||||
{
|
||||
bgMusic->Load(Settings.ogg_path);
|
||||
bgMusic->Play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user