Added more initializations in cellCamera

This commit is contained in:
Survanium90 2014-10-04 11:31:27 +04:00
parent aed76b2a0a
commit 70e5068e37

View File

@ -53,18 +53,30 @@ int cellCameraOpen()
int cellCameraOpenEx() int cellCameraOpenEx()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }
int cellCameraClose() int cellCameraClose()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }
int cellCameraGetDeviceGUID() int cellCameraGetDeviceGUID()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }
@ -72,6 +84,9 @@ int cellCameraGetType(s32 dev_num, vm::ptr<CellCameraType> type)
{ {
cellCamera->Warning("cellCameraGetType(dev_num=%d, type_addr=0x%x)", dev_num, type); cellCamera->Warning("cellCameraGetType(dev_num=%d, type_addr=0x%x)", dev_num, type);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
switch (Ini.CameraType.GetValue()) switch (Ini.CameraType.GetValue())
{ {
case 1: *type = CELL_CAMERA_EYETOY; break; case 1: *type = CELL_CAMERA_EYETOY; break;
@ -110,18 +125,30 @@ int cellCameraIsStarted()
int cellCameraGetAttribute() int cellCameraGetAttribute()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }
int cellCameraSetAttribute() int cellCameraSetAttribute()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }
int cellCameraGetBufferSize() int cellCameraGetBufferSize()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }
@ -134,6 +161,10 @@ int cellCameraGetBufferInfo()
int cellCameraGetBufferInfoEx() int cellCameraGetBufferInfoEx()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }
@ -164,60 +195,100 @@ int cellCameraSetExtensionUnit()
int cellCameraReset() int cellCameraReset()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }
int cellCameraStart() int cellCameraStart()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }
int cellCameraRead() int cellCameraRead()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }
int cellCameraReadEx() int cellCameraReadEx()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }
int cellCameraReadComplete() int cellCameraReadComplete()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }
int cellCameraStop() int cellCameraStop()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }
int cellCameraSetNotifyEventQueue() int cellCameraSetNotifyEventQueue()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }
int cellCameraRemoveNotifyEventQueue() int cellCameraRemoveNotifyEventQueue()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }
int cellCameraSetNotifyEventQueue2() int cellCameraSetNotifyEventQueue2()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }
int cellCameraRemoveNotifyEventQueue2() int cellCameraRemoveNotifyEventQueue2()
{ {
UNIMPLEMENTED_FUNC(cellCamera); UNIMPLEMENTED_FUNC(cellCamera);
if (!cellCameraInstance.m_bInitialized)
return CELL_CAMERA_ERROR_NOT_INIT;
return CELL_OK; return CELL_OK;
} }