mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-20 23:50:46 +01:00
[rpcsx-os] add --system flag
This commit is contained in:
parent
9865be85af
commit
563c5eaa2e
|
|
@ -56,6 +56,7 @@ struct Process final {
|
|||
|
||||
std::uint64_t nextTlsSlot = 1;
|
||||
std::uint64_t lastTlsOffset = 0;
|
||||
bool isSystem = false;
|
||||
|
||||
utils::RcIdMap<EventFlag, sint, 4097, 1> evfMap;
|
||||
utils::RcIdMap<Semaphore, sint, 4097, 1> semMap;
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ orbis::SysResult orbis::sys___sysctl(Thread *thread, ptr<sint> name,
|
|||
// std::printf(" kern.14.35.%u\n", name[3]);
|
||||
app_info result{
|
||||
.appType = 0,
|
||||
// .unk5 = slong(0x80000000'00000000),
|
||||
.unk5 = (thread->tproc->isSystem ? slong(0x80000000'00000000) : 0),
|
||||
};
|
||||
|
||||
return uwrite((ptr<app_info>)old, result);
|
||||
|
|
|
|||
|
|
@ -561,6 +561,7 @@ int main(int argc, const char *argv[]) {
|
|||
|
||||
bool enableAudio = false;
|
||||
bool asRoot = false;
|
||||
bool isSystem = false;
|
||||
|
||||
int argIndex = 1;
|
||||
while (argIndex < argc) {
|
||||
|
|
@ -596,6 +597,12 @@ int main(int argc, const char *argv[]) {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (argv[argIndex] == std::string_view("--system")) {
|
||||
argIndex++;
|
||||
isSystem = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (argv[argIndex] == std::string_view("--override") ||
|
||||
argv[argIndex] == std::string_view("-o")) {
|
||||
if (argc <= argIndex + 2) {
|
||||
|
|
@ -704,6 +711,7 @@ int main(int argc, const char *argv[]) {
|
|||
initProcess->onSysEnter = onSysEnter;
|
||||
initProcess->onSysExit = onSysExit;
|
||||
initProcess->ops = &rx::procOpsTable;
|
||||
initProcess->isSystem = isSystem;
|
||||
|
||||
auto [baseId, mainThread] = initProcess->threadsMap.emplace();
|
||||
mainThread->tproc = initProcess;
|
||||
|
|
|
|||
Loading…
Reference in a new issue