mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 05:38:49 +00:00
Impl sceSystemServiceLoadExec (#3647)
* Add support for restarting the emulator with new configurations - Implement `Restart` function in `Emulator` to enable process relaunch with updated parameters. - Modify `sceSystemServiceLoadExec` to use the restart functionality. * Add logging for emulator restart and system service load execution * Add IPC emulator PID output command Impl `PID` output command to return the emulator process ID - required for launches supporting emulator restart * Add log file append mode support (used after restarting to keep the same log file) * Keep game root between restarts * add --wait-for-debugger option flag * add --wait-for-pid flag used for sync between parent & child process during restart * impl restart via ipc * fix override game root * add qt flags to allow restart
This commit is contained in:
@@ -3,9 +3,12 @@
|
||||
|
||||
#include "common/config.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/singleton.h"
|
||||
#include "core/file_sys/fs.h"
|
||||
#include "core/libraries/libs.h"
|
||||
#include "core/libraries/system/systemservice.h"
|
||||
#include "core/libraries/system/systemservice_error.h"
|
||||
#include "emulator.h"
|
||||
|
||||
namespace Libraries::SystemService {
|
||||
|
||||
@@ -1866,8 +1869,18 @@ int PS4_SYSV_ABI sceSystemServiceLaunchWebBrowser() {
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
int PS4_SYSV_ABI sceSystemServiceLoadExec() {
|
||||
LOG_ERROR(Lib_SystemService, "(STUBBED) called");
|
||||
int PS4_SYSV_ABI sceSystemServiceLoadExec(const char* path, const char* argv[]) {
|
||||
LOG_DEBUG(Lib_SystemService, "called");
|
||||
auto emu = Common::Singleton<Core::Emulator>::Instance();
|
||||
auto mnt = Common::Singleton<Core::FileSys::MntPoints>::Instance();
|
||||
auto hostPath = mnt->GetHostPath(std::string_view(path));
|
||||
std::vector<std::string> args;
|
||||
if (argv != nullptr) {
|
||||
for (const char** ptr = argv; *ptr != nullptr; ptr++) {
|
||||
args.push_back(std::string(*ptr));
|
||||
}
|
||||
}
|
||||
emu->Restart(hostPath, args);
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -501,7 +501,7 @@ int PS4_SYSV_ABI sceSystemServiceLaunchEventDetails();
|
||||
int PS4_SYSV_ABI sceSystemServiceLaunchTournamentList();
|
||||
int PS4_SYSV_ABI sceSystemServiceLaunchTournamentsTeamProfile();
|
||||
int PS4_SYSV_ABI sceSystemServiceLaunchWebBrowser();
|
||||
int PS4_SYSV_ABI sceSystemServiceLoadExec();
|
||||
int PS4_SYSV_ABI sceSystemServiceLoadExec(const char* path, const char* argv[]);
|
||||
int PS4_SYSV_ABI sceSystemServiceNavigateToAnotherApp();
|
||||
int PS4_SYSV_ABI sceSystemServiceNavigateToGoBack();
|
||||
int PS4_SYSV_ABI sceSystemServiceNavigateToGoBackWithValue();
|
||||
|
||||
Reference in New Issue
Block a user