mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
Fix headless mode
This commit is contained in:
parent
cfe08de951
commit
7dc3a50ddf
3 changed files with 24 additions and 3 deletions
|
@ -105,7 +105,7 @@ public:
|
||||||
|
|
||||||
MsgDialogType type{};
|
MsgDialogType type{};
|
||||||
|
|
||||||
std::function<void(s32 status)> on_close;
|
std::function<void(s32 status)> on_close = nullptr;
|
||||||
|
|
||||||
virtual ~MsgDialogBase();
|
virtual ~MsgDialogBase();
|
||||||
virtual void Create(const std::string& msg, const std::string& title = "") = 0;
|
virtual void Create(const std::string& msg, const std::string& title = "") = 0;
|
||||||
|
|
|
@ -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.se_normal = true;
|
||||||
dlg->type.bg_invisible = true;
|
dlg->type.bg_invisible = true;
|
||||||
dlg->type.progress_bar_count = 1;
|
dlg->type.progress_bar_count = 1;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "Emu/Cell/Modules/cellOskDialog.h"
|
#include "Emu/Cell/Modules/cellOskDialog.h"
|
||||||
#include "Emu/Cell/Modules/cellSaveData.h"
|
#include "Emu/Cell/Modules/cellSaveData.h"
|
||||||
#include "Emu/Cell/Modules/sceNpTrophy.h"
|
#include "Emu/Cell/Modules/sceNpTrophy.h"
|
||||||
|
#include "Emu/Io/Null/null_camera_handler.h"
|
||||||
|
|
||||||
#include <clocale>
|
#include <clocale>
|
||||||
|
|
||||||
|
@ -87,6 +88,23 @@ void headless_application::InitializeCallbacks()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
callbacks.get_camera_handler = []() -> std::shared_ptr<camera_handler_base>
|
||||||
|
{
|
||||||
|
switch (g_cfg.io.camera.get())
|
||||||
|
{
|
||||||
|
case camera_handler::null:
|
||||||
|
case camera_handler::fake:
|
||||||
|
{
|
||||||
|
return std::make_shared<null_camera_handler>();
|
||||||
|
}
|
||||||
|
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<GSFrameBase>
|
callbacks.get_gs_frame = []() -> std::unique_ptr<GSFrameBase>
|
||||||
{
|
{
|
||||||
if (g_cfg.video.renderer != video_renderer::null)
|
if (g_cfg.video.renderer != video_renderer::null)
|
||||||
|
@ -107,6 +125,10 @@ void headless_application::InitializeCallbacks()
|
||||||
callbacks.on_stop = []() {};
|
callbacks.on_stop = []() {};
|
||||||
callbacks.on_ready = []() {};
|
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_string = [](localized_string_id, const char*) -> std::string { return {}; };
|
||||||
callbacks.get_localized_u32string = [](localized_string_id, const char*) -> std::u32string { return {}; };
|
callbacks.get_localized_u32string = [](localized_string_id, const char*) -> std::u32string { return {}; };
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue