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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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