| 594 | } |
| 595 | |
| 596 | error_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 | |
| 633 | error_code cellMsgDialogProgressBarReset(u32 progressBarIndex) |
| 634 | { |
nothing calls this directly
no test coverage detected