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

Function cellCameraOpen

ps3fw/cellCamera.cpp:531–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

529}
530
531error_code cellCameraOpen(s32 dev_num, vm::ptr<CellCameraInfo> info)
532{
533 cellCamera.notice("cellCameraOpen(dev_num=%d, info=*0x%x)", dev_num, info);
534
535 if (!info)
536 {
537 return CELL_CAMERA_ERROR_PARAM;
538 }
539
540 auto& g_camera = g_fxo->get<camera_thread>();
541
542 if (!g_camera.init)
543 {
544 return CELL_CAMERA_ERROR_NOT_INIT;
545 }
546
547 if (!check_dev_num(dev_num))
548 {
549 return CELL_CAMERA_ERROR_PARAM;
550 }
551
552 if (g_camera.is_open)
553 {
554 return CELL_CAMERA_ERROR_ALREADY_OPEN;
555 }
556
557 if (auto res = check_camera_info(*info))
558 {
559 return res;
560 }
561
562 if (!g_camera.is_attached)
563 {
564 return CELL_CAMERA_ERROR_DEVICE_NOT_FOUND;
565 }
566
567 return CELL_OK;
568}
569
570error_code cellCameraOpenAsync()
571{

Callers

nothing calls this directly

Calls 2

check_dev_numFunction · 0.85
check_camera_infoFunction · 0.85

Tested by

no test coverage detected