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

Function cellMsgDialogProgressBarSetMsg

ps3fw/cellMsgDialog.cpp:596–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

594}
595
596error_code cellMsgDialogProgressBarSetMsg(u32 progressBarIndex, vm::cptr<char> msgString)
597{
598 cellSysutil.warning("cellMsgDialogProgressBarSetMsg(progressBarIndex=%d, msgString=%s)", progressBarIndex, msgString);
599
600 if (!msgString || std::strlen(msgString.get_ptr()) >= CELL_MSGDIALOG_PROGRESSBAR_STRING_SIZE)
601 {
602 return CELL_MSGDIALOG_ERROR_PARAM;
603 }
604
605 if (auto manager = g_fxo->try_get<rsx::overlays::display_manager>())
606 {
607 if (auto dlg = manager->get<rsx::overlays::message_dialog>())
608 {
609 return dlg->progress_bar_set_message(progressBarIndex, msgString.get_ptr());
610 }
611 }
612
613 const auto dlg = g_fxo->get<msg_info>().get();
614
615 if (!dlg)
616 {
617 return CELL_MSGDIALOG_ERROR_DIALOG_NOT_OPENED;
618 }
619
620 if (progressBarIndex >= dlg->type.progress_bar_count)
621 {
622 return CELL_MSGDIALOG_ERROR_PARAM;
623 }
624
625 Emu.CallFromMainThread([=, msg = std::string{msgString.get_ptr()}]
626 {
627 dlg->ProgressBarSetMsg(progressBarIndex, msg);
628 });
629
630 return CELL_OK;
631}
632
633error_code cellMsgDialogProgressBarReset(u32 progressBarIndex)
634{

Callers

nothing calls this directly

Calls 5

get_ptrMethod · 0.45
getMethod · 0.45
CallFromMainThreadMethod · 0.45
ProgressBarSetMsgMethod · 0.45

Tested by

no test coverage detected