From 9e83bc6544f31512c9c3cad3166fdf89441e484e Mon Sep 17 00:00:00 2001 From: Yui <41573099+kigyui@users.noreply.github.com> Date: Mon, 12 Sep 2022 11:23:13 +0100 Subject: [PATCH] Add the ability to set the PSID from the configuration (#12637) --- rpcs3/Emu/Cell/lv2/sys_ss.cpp | 7 ++++--- rpcs3/Emu/system_config.h | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/Cell/lv2/sys_ss.cpp b/rpcs3/Emu/Cell/lv2/sys_ss.cpp index a073fca9f7..69f83b1fc8 100644 --- a/rpcs3/Emu/Cell/lv2/sys_ss.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_ss.cpp @@ -5,6 +5,7 @@ #include "Emu/IdManager.h" #include "Emu/Cell/PPUThread.h" #include "Emu/Cell/timers.hpp" +#include "Emu/system_config.h" #ifdef _WIN32 #include @@ -137,8 +138,8 @@ s32 sys_ss_get_open_psid(vm::ptr psid) { sys_ss.warning("sys_ss_get_open_psid(psid=*0x%x)", psid); - psid->high = 0; - psid->low = 0; + psid->high = g_cfg.sys.console_psid_high; + psid->low = g_cfg.sys.console_psid_low; return CELL_OK; } @@ -335,4 +336,4 @@ error_code sys_ss_individual_info_manager(u64 pkg_id, u64 a2, vm::ptr out_s } return CELL_OK; -} \ No newline at end of file +} diff --git a/rpcs3/Emu/system_config.h b/rpcs3/Emu/system_config.h index 43f91b673e..72076854bf 100644 --- a/rpcs3/Emu/system_config.h +++ b/rpcs3/Emu/system_config.h @@ -295,6 +295,8 @@ 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::uint<0,umax> console_psid_high{ this, "PSID high"}; + cfg::uint<0,umax> console_psid_low{ this, "PSID low"}; } sys{ this };