overlays: add optional sound to trophy popup

This commit is contained in:
Megamouse 2021-10-29 22:04:49 +02:00
parent f262e77fbd
commit 0e20acdf55
5 changed files with 22 additions and 0 deletions

View file

@ -5,6 +5,8 @@
#include "../Emu/System.h"
#include "../Emu/RSX/Overlays/overlay_trophy_notification.h"
#include "Utilities/File.h"
s32 trophy_notification_helper::ShowTrophyNotification(const SceNpTrophyDetails& trophy, const std::vector<uchar>& trophy_icon_buffer)
{
if (auto manager = g_fxo->try_get<rsx::overlays::display_manager>())
@ -26,6 +28,8 @@ s32 trophy_notification_helper::ShowTrophyNotification(const SceNpTrophyDetails&
// Move notification to upper lefthand corner
trophy_notification->move(m_game_window->mapToGlobal(QPoint(0, 0)));
trophy_notification->show();
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/trophy.wav");
});
return 0;