Skip to content

Commit

Permalink
Add the ability to set the PSID from the configuration (#12637)
Browse files Browse the repository at this point in the history
  • Loading branch information
kigyui committed Sep 12, 2022
1 parent 37aefe5 commit 9e83bc6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rpcs3/Emu/Cell/lv2/sys_ss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Windows.h>
Expand Down Expand Up @@ -137,8 +138,8 @@ s32 sys_ss_get_open_psid(vm::ptr<CellSsOpenPSID> 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;
}
Expand Down Expand Up @@ -335,4 +336,4 @@ error_code sys_ss_individual_info_manager(u64 pkg_id, u64 a2, vm::ptr<u64> out_s
}

return CELL_OK;
}
}
2 changes: 2 additions & 0 deletions rpcs3/Emu/system_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ struct cfg_root : cfg::node
cfg::_enum<CellKbMappingType> keyboard_type{ this, "Keyboard Type", CellKbMappingType{0} }; // CELL_KB_MAPPING_101 = US
cfg::_enum<enter_button_assign> 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 };

Expand Down

0 comments on commit 9e83bc6

Please sign in to comment.