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

Function sysutil_send_system_cmd

ps3fw/cellSysutil.cpp:165–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165extern s32 sysutil_send_system_cmd(u64 status, u64 param)
166{
167 s32 count = 0;
168
169 if (auto cbm = g_fxo->try_get<sysutil_cb_manager>())
170 {
171 if (status == CELL_SYSUTIL_DRAWING_BEGIN)
172 {
173 if (cbm->draw_cb_started.exchange(true))
174 {
175 cellSysutil.error(
176 "Tried to enqueue a second or more DRAWING_BEGIN callback!");
177 return CELL_SYSUTIL_ERROR_BUSY;
178 }
179 }
180 else if (status == CELL_SYSUTIL_DRAWING_END)
181 {
182 if (!cbm->draw_cb_started.exchange(false))
183 {
184 cellSysutil.error("Tried to enqueue a DRAWING_END callback without a "
185 "BEGIN callback!");
186 return -1;
187 }
188 }
189 else if (status == CELL_SYSUTIL_REQUEST_EXITGAME)
190 {
191 abort_lv2_watchdog();
192 }
193
194 for (sysutil_cb_manager::registered_cb cb : cbm->callbacks)
195 {
196 if (cb.callback)
197 {
198 cbm->registered.push(
199 sysutil_cb_manager::dispatcher_cb{[=](ppu_thread& ppu) -> s32
200 {
201 // TODO: check it and find the source of the return value (void
202 // isn't equal to CELL_OK)
203 cb.callback(ppu, status, param, cb.user_data);
204 return CELL_OK;
205 }});
206
207 count++;
208 }
209 }
210 }
211
212 return count;
213}
214
215extern u64 get_sysutil_cb_manager_read_count()
216{

Callers 15

open_msg_dialogFunction · 0.85
close_msg_dialogFunction · 0.85
exit_gameFunction · 0.85
open_exit_dialogFunction · 0.85
cellMsgDialogAbortFunction · 0.85
operator()Method · 0.85
send_open_home_menu_cmdsFunction · 0.85
close_osk_from_ps_buttonFunction · 0.85

Calls 4

abort_lv2_watchdogFunction · 0.85
errorMethod · 0.80
exchangeMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected