cellMusic: implement qt music handler

This commit is contained in:
Megamouse 2022-02-20 19:01:21 +01:00
parent 0dbfe314a3
commit 15e74357cf
27 changed files with 885 additions and 24 deletions

View file

@ -6,6 +6,7 @@
#include "Emu/Cell/Modules/cellSaveData.h"
#include "Emu/Cell/Modules/sceNpTrophy.h"
#include "Emu/Io/Null/null_camera_handler.h"
#include "Emu/Io/Null/null_music_handler.h"
#include <clocale>
@ -105,6 +106,22 @@ void headless_application::InitializeCallbacks()
return nullptr;
};
callbacks.get_music_handler = []() -> std::shared_ptr<music_handler_base>
{
switch (g_cfg.audio.music.get())
{
case music_handler::null:
{
return std::make_shared<null_music_handler>();
}
case music_handler::qt:
{
fmt::throw_exception("Headless mode can not be used with this music handler. Current handler: %s", g_cfg.audio.music.get());
}
}
return nullptr;
};
callbacks.get_gs_frame = []() -> std::unique_ptr<GSFrameBase>
{
if (g_cfg.video.renderer != video_renderer::null)