diff --git a/rpcs3/Emu/Cell/Modules/cellSysutil.cpp b/rpcs3/Emu/Cell/Modules/cellSysutil.cpp index cd3c662d1c..a306f73653 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysutil.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysutil.cpp @@ -469,6 +469,7 @@ error_code cellSysutilGetSystemParamString(CellSysutilParamId id, vm::ptr case CELL_SYSUTIL_SYSTEMPARAM_ID_NICKNAME: { copy_size = CELL_SYSUTIL_SYSTEMPARAM_NICKNAME_SIZE; + param_str = g_cfg.sys.system_name.to_string(); break; } diff --git a/rpcs3/Emu/system_config.cpp b/rpcs3/Emu/system_config.cpp index dea815b167..25aaa23709 100644 --- a/rpcs3/Emu/system_config.cpp +++ b/rpcs3/Emu/system_config.cpp @@ -10,3 +10,9 @@ bool cfg_root::node_core::enable_tsx_by_default() { return utils::has_rtm() && utils::has_mpx() && !utils::has_tsx_force_abort(); } + +std::string cfg_root::node_sys::get_random_system_name() +{ + std::srand(std::time(nullptr)); + return "RPCS3-" + std::to_string(100 + std::rand() % 899); +} diff --git a/rpcs3/Emu/system_config.h b/rpcs3/Emu/system_config.h index 4dddee05a1..14dc33c2e7 100644 --- a/rpcs3/Emu/system_config.h +++ b/rpcs3/Emu/system_config.h @@ -287,6 +287,8 @@ struct cfg_root : cfg::node struct node_sys : cfg::node { + static std::string get_random_system_name(); + node_sys(cfg::node* _this) : cfg::node(_this, "System") {} cfg::_enum license_area{ this, "License Area", CellSysutilLicenseArea{1} }; // CELL_SYSUTIL_LICENSE_AREA_A @@ -294,6 +296,7 @@ struct cfg_root : cfg::node cfg::_enum keyboard_type{ this, "Keyboard Type", CellKbMappingType{0} }; // CELL_KB_MAPPING_101 = US cfg::_enum enter_button_assignment{ this, "Enter button assignment", enter_button_assign::cross }; cfg::_int<-60*60*24*365*100LL, 60*60*24*365*100LL> console_time_offset{ this, "Console time offset (s)", 0 }; // console time offset, limited to +/-100years + cfg::string system_name{this, "System Name", get_random_system_name()}; cfg::uint<0, umax> console_psid_high{this, "PSID high"}; cfg::uint<0, umax> console_psid_low{this, "PSID low"}; cfg::string hdd_model{this, "HDD Model Name", ""};