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

Function cellMsgDialogOpen2

ps3fw/cellMsgDialog.cpp:373–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371}
372
373error_code cellMsgDialogOpen2(u32 type, vm::cptr<char> msgString, vm::ptr<CellMsgDialogCallback> callback, vm::ptr<void> userData, vm::ptr<void> extParam)
374{
375 cellSysutil.warning("cellMsgDialogOpen2(type=0x%x, msgString=%s, callback=*0x%x, userData=*0x%x, extParam=*0x%x)", type, msgString, callback, userData, extParam);
376
377 if (!msgString || std::strlen(msgString.get_ptr()) >= CELL_MSGDIALOG_STRING_SIZE || type & -0x33f8)
378 {
379 return CELL_MSGDIALOG_ERROR_PARAM;
380 }
381
382 const MsgDialogType _type = {type ^ CELL_MSGDIALOG_TYPE_BG_INVISIBLE};
383
384 switch (_type.button_type.unshifted())
385 {
386 case CELL_MSGDIALOG_TYPE_BUTTON_TYPE_NONE:
387 {
388 if (_type.default_cursor || _type.progress_bar_count > 2)
389 {
390 return CELL_MSGDIALOG_ERROR_PARAM;
391 }
392
393 break;
394 }
395 case CELL_MSGDIALOG_TYPE_BUTTON_TYPE_YESNO:
396 {
397 if (_type.default_cursor > 1 || _type.progress_bar_count)
398 {
399 return CELL_MSGDIALOG_ERROR_PARAM;
400 }
401
402 break;
403 }
404 case CELL_MSGDIALOG_TYPE_BUTTON_TYPE_OK:
405 {
406 if (_type.default_cursor || _type.progress_bar_count)
407 {
408 return CELL_MSGDIALOG_ERROR_PARAM;
409 }
410
411 break;
412 }
413 default: return CELL_MSGDIALOG_ERROR_PARAM;
414 }
415
416 if (_type.se_normal)
417 {
418 cellSysutil.warning("Opening message dialog with message: %s", msgString);
419 }
420 else
421 {
422 cellSysutil.error("Opening error message dialog with message: %s", msgString);
423 }
424
425 return open_msg_dialog(false, type, msgString, msg_dialog_source::_cellMsgDialog, callback, userData, extParam);
426}
427
428error_code cellMsgDialogOpen(u32 type, vm::cptr<char> msgString, vm::ptr<CellMsgDialogCallback> callback, vm::ptr<void> userData, vm::ptr<void> extParam)
429{

Callers 3

cellMsgDialogOpenFunction · 0.85

Calls 4

open_msg_dialogFunction · 0.85
errorMethod · 0.80
get_ptrMethod · 0.45
unshiftedMethod · 0.45

Tested by

no test coverage detected