Fix background music selection

This commit is contained in:
wiidev 2021-04-04 19:00:02 +01:00
parent 9a9dc451ef
commit 3bf1f02468
25 changed files with 64 additions and 80 deletions

View File

@ -224,7 +224,7 @@ msgstr "Zpet"
msgid "Back to HBC or Wii Menu"
msgstr "Zpet do HBC nebo Wii nabídky"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Hudba na pozadí"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr "Nedostatek pameti"
msgid "Not required"
msgstr "Není nutné"
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Nepodporovaný formát!"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "Tilbage"
msgid "Back to HBC or Wii Menu"
msgstr "Tilbage til HBC eller Wii-menuen"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Baggrundsmusik"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr "Ikke nok hukommelse."
msgid "Not required"
msgstr "Ikke påkrævet"
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Ikke et understøttet format"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "Terug"
msgid "Back to HBC or Wii Menu"
msgstr "Terug naar HBC of Wii Menu"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Achtergrondmuziek"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr "Onvoldoende geheugen."
msgid "Not required"
msgstr "Niet nodig"
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Formaat niet ondersteund!"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr ""
msgid "Back to HBC or Wii Menu"
msgstr ""
msgid "Backgroundmusic"
msgid "Background Music"
msgstr ""
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr ""
msgid "Not required"
msgstr ""
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr ""
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "Takaisin"
msgid "Back to HBC or Wii Menu"
msgstr "Takaisin HBC:hen tai Wii Menuun"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Taustamusiikki"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr ""
msgid "Not required"
msgstr ""
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Ei tuettu formaatti!"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "Retour"
msgid "Back to HBC or Wii Menu"
msgstr "Retour HBC / Menu Wii"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Fond sonore"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr "Mémoire insuffisante."
msgid "Not required"
msgstr "Non requis"
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Format non supporté !"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "Zurück"
msgid "Back to HBC or Wii Menu"
msgstr "Zurück zum Homebrewkanal oder Wii Menü"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Hintergrundmusik"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr "Nicht genug Speicher."
msgid "Not required"
msgstr "Nicht benötigt"
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Nicht unterstütztes Format!"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr ""
msgid "Back to HBC or Wii Menu"
msgstr "Μετάβαση στο κανάλι Homebrew ή στο μενού του Wii"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Μουσική υπόκρουση"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr "Δεν υπάρχει αρκετή μνήμη διαθέσιμη."
msgid "Not required"
msgstr "Δεν απαιτείται"
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Ο τύπος αρχείου δεν υποστηρίζεται!"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "Vissza"
msgid "Back to HBC or Wii Menu"
msgstr "Visszatérés a HBC-be vagy Wii Menübe"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Háttérzene"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr ""
msgid "Not required"
msgstr ""
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Nem támogatott formátum"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "Indietro"
msgid "Back to HBC or Wii Menu"
msgstr "Torna a HBC o Menu Wii"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Musica di sottofondo"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr "Memoria insufficiente."
msgid "Not required"
msgstr "Non necessario"
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Formato non supportato!"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "もどる"
msgid "Back to HBC or Wii Menu"
msgstr "HBC/Wiiメニューへ"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "BGM"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr "メモリが足りません"
msgid "Not required"
msgstr "必要なし"
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "対応していない形式です!"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "뒤로"
msgid "Back to HBC or Wii Menu"
msgstr "홈브류 채널 또는 Wii 메뉴로 돌아가기"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "배경음악"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr "메모리가 충분하지 않습니다."
msgid "Not required"
msgstr "필요 없음"
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "지원되지 않는 포맷!"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "Tilbake"
msgid "Back to HBC or Wii Menu"
msgstr "Tilbake til HBC eller Wii meny"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Bakgrunnsmusikk"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr "Ikke nok minne."
msgid "Not required"
msgstr "Ikke nødvendig"
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Ikke et støttet format!"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "Cofnij"
msgid "Back to HBC or Wii Menu"
msgstr "Powrot do HBC/Wii Menu"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Muzyka w tle"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr ""
msgid "Not required"
msgstr ""
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Nieobslugiwany format"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "Voltar"
msgid "Back to HBC or Wii Menu"
msgstr "Voltar ao HBC ou Menu Wii"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Música de fundo"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr "Não há memória suficiente."
msgid "Not required"
msgstr "Não requerido"
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Formato não suportado!"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "Voltar"
msgid "Back to HBC or Wii Menu"
msgstr "Voltar ao HBC ou Menu Wii"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Música de fundo"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr "Não há memória suficiente."
msgid "Not required"
msgstr "Não requerido"
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Formato não suportado!"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "Назад"
msgid "Back to HBC or Wii Menu"
msgstr "Вернуться в HBC или меню Wii"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Фоновая музыка"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr ""
msgid "Not required"
msgstr ""
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Формат не поддерживается"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "返回"
msgid "Back to HBC or Wii Menu"
msgstr "返回 HBC 或 Wii 系统菜单"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "背景音乐"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr "内存不足。"
msgid "Not required"
msgstr "不需要"
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "不支持的格式!"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "Atrás"
msgid "Back to HBC or Wii Menu"
msgstr "Volver a HBC o Menú Wii"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Música de fondo"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr "No hay suficiente memoria."
msgid "Not required"
msgstr "No requerido"
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Formato no soportado."
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "Tillbaka"
msgid "Back to HBC or Wii Menu"
msgstr "Tillbaka till HBC eller Wii-Menyn"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Bakgrundsmusik"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr ""
msgid "Not required"
msgstr ""
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Formatet stöds inte!"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "返回"
msgid "Back to HBC or Wii Menu"
msgstr "返回 HBC 或 Wii 系統選單"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "背景音樂"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr "記憶體不足。"
msgid "Not required"
msgstr "不需要"
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "未支援的格式!"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "ย้อนกลับ"
msgid "Back to HBC or Wii Menu"
msgstr "กลับไป HBC หรือ เมนู Wii"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "ดนตรีเบื้องหลัง"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr ""
msgid "Not required"
msgstr ""
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "ไม่รองรับรูปแบบไฟล์นี้"
msgid "Nothing selected to delete."

View File

@ -224,7 +224,7 @@ msgstr "Geri"
msgid "Back to HBC or Wii Menu"
msgstr "HBC veya Wii Menüye dönüş"
msgid "Backgroundmusic"
msgid "Background Music"
msgstr "Arkaplan müziği"
msgid "Banner Animation"
@ -1629,7 +1629,7 @@ msgstr ""
msgid "Not required"
msgstr ""
msgid "Not supported format!"
msgid "Unsupported format!"
msgstr "Desteklenmeyen format!"
msgid "Nothing selected to delete."

View File

@ -30,50 +30,34 @@ extern u8 reset;
bool MenuBackgroundMusic()
{
bool ret = false;
int result = -1;
char entered[1024];
strlcpy(entered, Settings.ogg_path, sizeof(entered));
// Check the OGG path.
if (entered[0] == 0 )
{
// OGG path is empty.
strlcpy(entered, Settings.BootDevice, sizeof(entered));
}
if (!Settings.ogg_path[0])
snprintf(entered, sizeof(entered), "%s/", Settings.BootDevice);
else
{
snprintf(entered, sizeof(entered), "%s", Settings.ogg_path);
char *pathptr = strrchr(entered, '/');
if ( pathptr )
if (!pathptr)
snprintf(entered, sizeof(entered), "%s/", Settings.BootDevice);
else
{
pathptr++;
int choice = WindowPrompt(tr("Playing Music:" ), pathptr, tr("Play Previous"), tr("Play Next"), tr("Change Play Path"), tr("Cancel"));
if (choice == 1)
{
return bgMusic->PlayPrevious();
}
else if (choice == 2)
{
return bgMusic->PlayNext();
}
else if (choice == 3)
{
pathptr[0] = 0;
}
else
return true;
}
else
strlcpy(entered, Settings.BootDevice, sizeof(entered));
}
result = BrowseDevice( entered, sizeof( entered ), FB_DEFAULT );
if ( result )
if (BrowseDevice(entered, sizeof(entered), FB_DEFAULT))
{
if (!bgMusic->Load(entered))
{
WindowPrompt( tr( "Not supported format!" ), tr( "Loading standard music." ), tr( "OK" ) );
}
WindowPrompt(tr("Unsupported format!"), tr("Loading standard music."), tr("OK"));
else
ret = true;
bgMusic->Play();

View File

@ -47,7 +47,7 @@ SoundSettingsMenu::SoundSettingsMenu()
: SettingsMenu(tr("Sound Settings"), &GuiOptions, MENU_NONE)
{
int Idx = 0;
Options->SetName(Idx++, "%s", tr( "Backgroundmusic" ));
Options->SetName(Idx++, "%s", tr( "Background Music" ));
Options->SetName(Idx++, "%s", tr( "Music Volume" ));
Options->SetName(Idx++, "%s", tr( "SFX Volume" ));
Options->SetName(Idx++, "%s", tr( "Game Sound Mode" ));
@ -62,7 +62,7 @@ void SoundSettingsMenu::SetOptionValues()
{
int Idx = 0;
//! Settings: Backgroundmusic
//! Settings: Background Music
const char * filename = strrchr(Settings.ogg_path, '/');
if (filename)
Options->SetValue(Idx++, filename+1);
@ -106,7 +106,7 @@ int SoundSettingsMenu::GetMenuInternal()
int Idx = -1;
//! Settings: Backgroundmusic
//! Settings: Background Music
if (ret == ++Idx)
{
GuiWindow * parent = (GuiWindow *) parentElement;