mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-14 08:12:16 +00:00
load trophy from .wav (#2603)
Co-authored-by: smiRaphi <neogt404@gmail.com>
This commit is contained in:
parent
f4dc8dca8d
commit
eaa18d4e3c
2 changed files with 8 additions and 4 deletions
|
@ -92,10 +92,14 @@ TrophyUI::TrophyUI(const std::filesystem::path& trophyIconPath, const std::strin
|
||||||
AddLayer(this);
|
AddLayer(this);
|
||||||
|
|
||||||
#ifdef ENABLE_QT_GUI
|
#ifdef ENABLE_QT_GUI
|
||||||
QString musicPath = QString::fromStdString(CustomTrophy_Dir.string() + "/trophy.mp3");
|
QString musicPathWav = QString::fromStdString(CustomTrophy_Dir.string() + "/trophy.wav");
|
||||||
if (fs::exists(musicPath.toStdString())) {
|
QString musicPathMp3 = QString::fromStdString(CustomTrophy_Dir.string() + "/trophy.mp3");
|
||||||
|
if (fs::exists(musicPathWav.toStdString())) {
|
||||||
BackgroundMusicPlayer::getInstance().setVolume(100);
|
BackgroundMusicPlayer::getInstance().setVolume(100);
|
||||||
BackgroundMusicPlayer::getInstance().playMusic(musicPath, false);
|
BackgroundMusicPlayer::getInstance().playMusic(musicPathWav, false);
|
||||||
|
} else if (fs::exists(musicPathMp3.toStdString())) {
|
||||||
|
BackgroundMusicPlayer::getInstance().setVolume(100);
|
||||||
|
BackgroundMusicPlayer::getInstance().playMusic(musicPathMp3, false);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -635,7 +635,7 @@ void SettingsDialog::updateNoteTextEdit(const QString& elementName) {
|
||||||
|
|
||||||
//User
|
//User
|
||||||
if (elementName == "OpenCustomTrophyLocationButton") {
|
if (elementName == "OpenCustomTrophyLocationButton") {
|
||||||
text = tr("Open the custom trophy images/sounds folder:\\nYou can add custom images to the trophies and an audio.\\nAdd the files to custom_trophy with the following names:\\ntrophy.mp3, bronze.png, gold.png, platinum.png, silver.png\\nNote: The sound will only work in QT versions.");
|
text = tr("Open the custom trophy images/sounds folder:\\nYou can add custom images to the trophies and an audio.\\nAdd the files to custom_trophy with the following names:\\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\\nNote: The sound will only work in QT versions.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Input
|
// Input
|
||||||
|
|
Loading…
Add table
Reference in a new issue