mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-16 16:29:18 +01:00
*little fix to ignore case sensitivity on searching files on the WiiDisc (Thanks to LoudBob11 for pointing it out)
*Added new options for BannerSounds (You can loop them, make it be quite after once played or play the BGM again) NOTE: Changed the way how to disable BannerSounds. If you make Volume to 0 than the loading of the BannerSounds is disabled now.
This commit is contained in:
parent
781d204691
commit
ef956c430a
File diff suppressed because one or more lines are too long
@ -170,7 +170,8 @@ const u8 *LoadBannerSound(const u8 *discid, u32 *size)
|
|||||||
break;
|
break;
|
||||||
if (i >= fst[0].numEntries)
|
if (i >= fst[0].numEntries)
|
||||||
{
|
{
|
||||||
WindowPrompt(tr("sound.bin not found."), 0, tr("OK"));
|
/* Not all games have a sound.bin and this message is annoying **/
|
||||||
|
//WindowPrompt(tr("sound.bin not found."), 0, tr("OK"));
|
||||||
free(opening_bnr);
|
free(opening_bnr);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ static u32 do_fst(wiidisc_t *d,u8 *fst, const char *names, u32 i)
|
|||||||
return size;
|
return size;
|
||||||
} else {
|
} else {
|
||||||
offset = _be32(fst + 12*i + 4);
|
offset = _be32(fst + 12*i + 4);
|
||||||
if(d->extract_pathname && strcmp(name, d->extract_pathname)==0)
|
if(d->extract_pathname && stricmp(name, d->extract_pathname)==0)
|
||||||
{
|
{
|
||||||
d->extracted_buffer = wbfs_ioalloc(size);
|
d->extracted_buffer = wbfs_ioalloc(size);
|
||||||
partition_read(d,offset, d->extracted_buffer, size,0);
|
partition_read(d,offset, d->extracted_buffer, size,0);
|
||||||
|
@ -1234,7 +1234,7 @@ int GameWindowPrompt() {
|
|||||||
|
|
||||||
//load disc image based or what game is seleted
|
//load disc image based or what game is seleted
|
||||||
struct discHdr * header = (mountMethod==1||mountMethod==2?dvdheader:&gameList[gameSelected]);
|
struct discHdr * header = (mountMethod==1||mountMethod==2?dvdheader:&gameList[gameSelected]);
|
||||||
if(Settings.gamesound)
|
if(Settings.gamesoundvolume > 0)
|
||||||
{
|
{
|
||||||
if(gameSound)
|
if(gameSound)
|
||||||
{
|
{
|
||||||
@ -1248,6 +1248,8 @@ int GameWindowPrompt() {
|
|||||||
{
|
{
|
||||||
gameSound = new GuiSound(gameSoundData, gameSoundDataLen, Settings.gamesoundvolume, false, true);
|
gameSound = new GuiSound(gameSoundData, gameSoundDataLen, Settings.gamesoundvolume, false, true);
|
||||||
bgMusic->SetVolume(0);
|
bgMusic->SetVolume(0);
|
||||||
|
if(Settings.gamesound == 2)
|
||||||
|
gameSound->SetLoop(1);
|
||||||
gameSound->Play();
|
gameSound->Play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1383,8 +1385,11 @@ int GameWindowPrompt() {
|
|||||||
if(gameSound)
|
if(gameSound)
|
||||||
{
|
{
|
||||||
if(!gameSound->IsPlaying())
|
if(!gameSound->IsPlaying())
|
||||||
|
{
|
||||||
|
if(Settings.gamesound == 1)
|
||||||
bgMusic->SetVolume(Settings.volume);
|
bgMusic->SetVolume(Settings.volume);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (btn1.GetState() == STATE_CLICKED) {
|
if (btn1.GetState() == STATE_CLICKED) {
|
||||||
//playcounter
|
//playcounter
|
||||||
|
@ -1304,18 +1304,20 @@ int MenuSettings()
|
|||||||
|
|
||||||
if(ret == ++Idx || firstRun)
|
if(ret == ++Idx || firstRun)
|
||||||
{
|
{
|
||||||
if(firstRun) options2.SetName(Idx, "%s",tr("Game (Banner) Sounds"));
|
if(firstRun) options2.SetName(Idx, "%s",tr("Game Sound Mode"));
|
||||||
if(ret == Idx)
|
if(ret == Idx)
|
||||||
{
|
{
|
||||||
Settings.gamesound++;
|
Settings.gamesound++;
|
||||||
if (Settings.gamesound > 1)
|
if (Settings.gamesound > 2)
|
||||||
Settings.gamesound = 0;
|
Settings.gamesound = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Settings.gamesound == 1)
|
if(Settings.gamesound == 1)
|
||||||
options2.SetValue(Idx,"%s", tr("ON"));
|
options2.SetValue(Idx,"%s", tr("Sound+BGM"));
|
||||||
|
else if(Settings.gamesound == 2)
|
||||||
|
options2.SetValue(Idx,"%s", tr("Loop Sound"));
|
||||||
else
|
else
|
||||||
options2.SetValue(Idx,"%s", tr("OFF"));
|
options2.SetValue(Idx,"%s", tr("Sound+Quiet"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ret == ++Idx || firstRun)
|
if(ret == ++Idx || firstRun)
|
||||||
@ -1328,7 +1330,10 @@ int MenuSettings()
|
|||||||
Settings.gamesoundvolume = 0;
|
Settings.gamesoundvolume = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Settings.gamesoundvolume > 0)
|
||||||
options2.SetValue(Idx,"%i", Settings.gamesoundvolume);
|
options2.SetValue(Idx,"%i", Settings.gamesoundvolume);
|
||||||
|
else
|
||||||
|
options2.SetValue(Idx,"%s", tr("OFF"));
|
||||||
}
|
}
|
||||||
|
|
||||||
firstRun = false;
|
firstRun = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user