diff --git a/rpcs3/Emu/Cell/Modules/cellMsgDialog.h b/rpcs3/Emu/Cell/Modules/cellMsgDialog.h index 9c9e5dad87..af787431af 100644 --- a/rpcs3/Emu/Cell/Modules/cellMsgDialog.h +++ b/rpcs3/Emu/Cell/Modules/cellMsgDialog.h @@ -105,7 +105,7 @@ public: MsgDialogType type{}; - std::function on_close; + std::function on_close = nullptr; virtual ~MsgDialogBase(); virtual void Create(const std::string& msg, const std::string& title = "") = 0; diff --git a/rpcs3/Emu/system_progress.cpp b/rpcs3/Emu/system_progress.cpp index 7c2013adee..f5248dad7b 100644 --- a/rpcs3/Emu/system_progress.cpp +++ b/rpcs3/Emu/system_progress.cpp @@ -81,9 +81,8 @@ void progress_dialog_server::operator()() } } - if (!skip_this_one && !native_dlg) + if (!skip_this_one && !native_dlg && (dlg = Emu.GetCallbacks().get_msg_dialog())) { - dlg = Emu.GetCallbacks().get_msg_dialog(); dlg->type.se_normal = true; dlg->type.bg_invisible = true; dlg->type.progress_bar_count = 1; diff --git a/rpcs3/headless_application.cpp b/rpcs3/headless_application.cpp index 8424878d48..75470770df 100644 --- a/rpcs3/headless_application.cpp +++ b/rpcs3/headless_application.cpp @@ -5,6 +5,7 @@ #include "Emu/Cell/Modules/cellOskDialog.h" #include "Emu/Cell/Modules/cellSaveData.h" #include "Emu/Cell/Modules/sceNpTrophy.h" +#include "Emu/Io/Null/null_camera_handler.h" #include @@ -87,6 +88,23 @@ void headless_application::InitializeCallbacks() } }; + callbacks.get_camera_handler = []() -> std::shared_ptr + { + switch (g_cfg.io.camera.get()) + { + case camera_handler::null: + case camera_handler::fake: + { + return std::make_shared(); + } + case camera_handler::qt: + { + fmt::throw_exception("Headless mode can not be used with this camera handler. Current handler: %s", g_cfg.io.camera.get()); + } + } + return nullptr; + }; + callbacks.get_gs_frame = []() -> std::unique_ptr { if (g_cfg.video.renderer != video_renderer::null) @@ -107,6 +125,10 @@ void headless_application::InitializeCallbacks() callbacks.on_stop = []() {}; callbacks.on_ready = []() {}; + callbacks.on_missing_fw = []() { return false; }; + + callbacks.handle_taskbar_progress = [](s32, s32) {}; + callbacks.get_localized_string = [](localized_string_id, const char*) -> std::string { return {}; }; callbacks.get_localized_u32string = [](localized_string_id, const char*) -> std::u32string { return {}; };