cli: set user-id per command line

This commit is contained in:
Megamouse 2021-04-02 00:54:32 +02:00
parent 98687d474b
commit 9c7230e79f
11 changed files with 165 additions and 119 deletions

View file

@ -33,21 +33,12 @@
LOG_CHANNEL(sys_log, "SYS");
/** Emu.Init() wrapper for user manager */
bool main_application::InitializeEmulator(const std::string& user, bool force_init, bool show_gui)
/** Emu.Init() wrapper for user management */
void main_application::InitializeEmulator(const std::string& user, bool show_gui)
{
Emu.SetHasGui(show_gui);
// try to set a new user
const bool user_was_set = Emu.SetUsr(user);
// only init the emulation if forced or a user was set
if (user_was_set || force_init)
{
Emu.Init();
}
return user_was_set;
Emu.SetUsr(user);
Emu.Init();
}
/** RPCS3 emulator has functions it desires to call from the GUI at times. Initialize them in here. */