| 341 | } |
| 342 | |
| 343 | error_code open_exit_dialog(const std::string& message, bool is_exit_requested, msg_dialog_source source) |
| 344 | { |
| 345 | cellSysutil.notice("open_exit_dialog(message=%s, is_exit_requested=%d, source=%s)", message, is_exit_requested, source); |
| 346 | |
| 347 | vm::bptr<CellMsgDialogCallback> callback = vm::null; |
| 348 | |
| 349 | if (is_exit_requested) |
| 350 | { |
| 351 | callback.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(exit_game))); |
| 352 | } |
| 353 | |
| 354 | const error_code res = open_msg_dialog( |
| 355 | true, |
| 356 | CELL_MSGDIALOG_TYPE_SE_TYPE_ERROR | CELL_MSGDIALOG_TYPE_BUTTON_TYPE_OK | CELL_MSGDIALOG_TYPE_DISABLE_CANCEL_ON, |
| 357 | vm::make_str(message), |
| 358 | source, |
| 359 | callback); |
| 360 | |
| 361 | if (res != CELL_OK) |
| 362 | { |
| 363 | // Something went wrong, exit anyway |
| 364 | if (is_exit_requested) |
| 365 | { |
| 366 | sysutil_send_system_cmd(CELL_SYSUTIL_REQUEST_EXITGAME, 0); |
| 367 | } |
| 368 | } |
| 369 | |
| 370 | return CELL_OK; |
| 371 | } |
| 372 | |
| 373 | error_code cellMsgDialogOpen2(u32 type, vm::cptr<char> msgString, vm::ptr<CellMsgDialogCallback> callback, vm::ptr<void> userData, vm::ptr<void> extParam) |
| 374 | { |
no test coverage detected