MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / Load

Method Load

rpcs3/Emu/System.cpp:1070–2551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1068}
1069
1070game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch, usz recursion_count)
1071{
1072 if (recursion_count == 0 && m_restrict_emu_state_change)
1073 {
1074 return game_boot_result::currently_restricted;
1075 }
1076
1077 if (recursion_count == 0 && m_state != system_state::stopped)
1078 {
1079 return game_boot_result::still_running;
1080 }
1081
1082 struct cleanup_t
1083 {
1084 Emulator* _this;
1085 usz recursion_count;
1086
1087 ~cleanup_t() noexcept
1088 {
1089 if (recursion_count != 0)
1090 {
1091 return;
1092 }
1093
1094 _this->m_state.compare_and_swap_test(system_state::loading, system_state::stopped);
1095
1096 if (_this->IsStopped())
1097 {
1098 _this->Kill(false);
1099 }
1100 }
1101 } cleanup{this, recursion_count};
1102
1103 ensure(recursion_count != 0 || m_state.compare_and_swap_test(system_state::stopped, system_state::loading));
1104
1105 const auto guard = MakeEmulationStateGuard();
1106
1107 // Enable logging
1108 rpcs3::utils::configure_logs(true);
1109
1110 m_ar.reset();
1111
1112 {
1113 if (m_config_mode == cfg_mode::continuous)
1114 {
1115 // The program is being booted from another running program
1116 // CELL_GAME_GAMETYPE_GAMEDATA is not used as boot type
1117
1118 if (m_cat == "DG"sv)
1119 {
1120 m_boot_source_type = CELL_GAME_GAMETYPE_DISC;
1121 }
1122 else if (m_cat == "HM"sv)
1123 {
1124 m_boot_source_type = CELL_GAME_GAMETYPE_HOME;
1125 }
1126 else
1127 {

Callers 4

trophy_context_tMethod · 0.45
load_trophiesMethod · 0.45

Calls 15

configure_logsFunction · 0.85
make_savestate_readerFunction · 0.85
load_and_check_reservedFunction · 0.85
throw_exceptionClass · 0.85
tar_objectClass · 0.85
get_hdd1_dirFunction · 0.85
get_hdd0_dirFunction · 0.85
getFunction · 0.85
get_parent_dirFunction · 0.85

Tested by

no test coverage detected