Qt: use play_sound callback instead of QSound

This commit is contained in:
Megamouse 2023-01-10 20:30:49 +01:00
parent 29078bc428
commit d28eea342a

View file

@ -22,7 +22,6 @@
#include <QMessageBox>
#include <QPainter>
#include <QScreen>
#include <QSound>
#include <string>
#include <thread>
@ -465,7 +464,7 @@ void gs_frame::toggle_recording()
// Play a sound
if (const std::string sound_path = fs::get_config_dir() + "sounds/snd_recording.wav"; fs::is_file(sound_path))
{
QSound::play(qstr(sound_path));
Emu.GetCallbacks().play_sound(sound_path);
}
else
{
@ -1006,7 +1005,7 @@ void gs_frame::take_screenshot(std::vector<u8> data, const u32 sshot_width, cons
{
if (const std::string sound_path = fs::get_config_dir() + "sounds/snd_screenshot.wav"; fs::is_file(sound_path))
{
QSound::play(qstr(sound_path));
Emu.GetCallbacks().play_sound(sound_path);
}
else
{