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

Function cellMsgDialogClose

ps3fw/cellMsgDialog.cpp:512–543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

510}
511
512error_code cellMsgDialogClose(f32 delay)
513{
514 cellSysutil.warning("cellMsgDialogClose(delay=%f)", delay);
515
516 const u64 wait_until = get_guest_system_time() + static_cast<s64>(std::max<float>(delay, 0.0f) * 1000);
517
518 if (auto manager = g_fxo->try_get<rsx::overlays::display_manager>())
519 {
520 if (auto dlg = manager->get<rsx::overlays::message_dialog>();
521 dlg && dlg->source() == msg_dialog_source::_cellMsgDialog)
522 {
523 auto& thr = g_fxo->get<msg_dlg_thread>();
524 thr.wait_until = wait_until;
525 thr.wait_until.notify_one();
526 return CELL_OK;
527 }
528
529 return CELL_MSGDIALOG_ERROR_DIALOG_NOT_OPENED;
530 }
531
532 const auto dlg = g_fxo->get<msg_info>().get();
533
534 if (!dlg || dlg->source != msg_dialog_source::_cellMsgDialog)
535 {
536 return CELL_MSGDIALOG_ERROR_DIALOG_NOT_OPENED;
537 }
538
539 auto& thr = g_fxo->get<msg_dlg_thread>();
540 thr.wait_until = wait_until;
541 thr.wait_until.notify_one();
542 return CELL_OK;
543}
544
545error_code cellMsgDialogAbort()
546{

Callers 1

Calls 4

get_guest_system_timeFunction · 0.85
sourceMethod · 0.80
notify_oneMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected