[rpcsx-os] implement --root flag

This commit is contained in:
DH 2023-09-03 22:23:50 +03:00
parent 35ba07f676
commit 89b7dcd497

View file

@ -531,6 +531,7 @@ int main(int argc, const char *argv[]) {
rx::vfs::initialize();
bool enableAudio = false;
bool asRoot = false;
int argIndex = 1;
while (argIndex < argc) {
@ -560,6 +561,12 @@ int main(int argc, const char *argv[]) {
continue;
}
if (argv[argIndex] == std::string_view("--root")) {
argIndex++;
asRoot = true;
continue;
}
if (argv[argIndex] == std::string_view("--override") ||
argv[argIndex] == std::string_view("-o")) {
if (argc <= argIndex + 2) {
@ -597,7 +604,7 @@ int main(int argc, const char *argv[]) {
}
// rx::vm::printHostStats();
auto initProcess = orbis::g_context.createProcess(10);
auto initProcess = orbis::g_context.createProcess(asRoot ? 1 : 10);
pthread_setname_np(pthread_self(), "10.MAINTHREAD");
std::thread{[] {