mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-08 20:58:41 +00:00
Don't bother trying to restart the emulator if sceSystemServiceLoadExec is called with an invalid path (#3845)
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include <cstdlib>
|
||||||
#include "common/config.h"
|
#include "common/config.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "common/singleton.h"
|
#include "common/singleton.h"
|
||||||
@@ -1874,6 +1875,10 @@ int PS4_SYSV_ABI sceSystemServiceLoadExec(const char* path, const char* argv[])
|
|||||||
auto emu = Common::Singleton<Core::Emulator>::Instance();
|
auto emu = Common::Singleton<Core::Emulator>::Instance();
|
||||||
auto mnt = Common::Singleton<Core::FileSys::MntPoints>::Instance();
|
auto mnt = Common::Singleton<Core::FileSys::MntPoints>::Instance();
|
||||||
auto hostPath = mnt->GetHostPath(std::string_view(path));
|
auto hostPath = mnt->GetHostPath(std::string_view(path));
|
||||||
|
if (hostPath.empty()) {
|
||||||
|
LOG_INFO(Lib_SystemService, "Restart called with invalid file '{}', exiting.", path);
|
||||||
|
std::quick_exit(0);
|
||||||
|
}
|
||||||
std::vector<std::string> args;
|
std::vector<std::string> args;
|
||||||
if (argv != nullptr) {
|
if (argv != nullptr) {
|
||||||
for (const char** ptr = argv; *ptr != nullptr; ptr++) {
|
for (const char** ptr = argv; *ptr != nullptr; ptr++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user