mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-01 15:48:49 +00:00
(PS3) Added error logs to image.c for debugging purposes
This commit is contained in:
parent
f16b269685
commit
01fb168f51
23
ps3/image.c
23
ps3/image.c
@ -95,6 +95,7 @@ static bool ps3graphics_load_jpeg(const char * path, struct texture_image *out_i
|
||||
|
||||
if (ret_jpeg != CELL_OK)
|
||||
{
|
||||
SSNES_ERR("cellJpgDecCreate\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -112,6 +113,7 @@ static bool ps3graphics_load_jpeg(const char * path, struct texture_image *out_i
|
||||
|
||||
if (ret != CELL_OK)
|
||||
{
|
||||
SSNES_ERR("cellJpgDecOpen\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -119,6 +121,7 @@ static bool ps3graphics_load_jpeg(const char * path, struct texture_image *out_i
|
||||
|
||||
if (ret != CELL_OK)
|
||||
{
|
||||
SSNES_ERR("cellJpgDecReadHeader\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -132,6 +135,7 @@ static bool ps3graphics_load_jpeg(const char * path, struct texture_image *out_i
|
||||
|
||||
if (ret != CELL_OK)
|
||||
{
|
||||
SSNES_ERR("cellJpgDecSetParameter\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -140,6 +144,7 @@ static bool ps3graphics_load_jpeg(const char * path, struct texture_image *out_i
|
||||
|
||||
if (ret != CELL_OK || dOutInfo.status != CELL_JPGDEC_DEC_STATUS_FINISH)
|
||||
{
|
||||
SSNES_ERR("cellJpgDecDecodeData\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -193,7 +198,10 @@ static bool ps3graphics_load_png(const char * path, struct texture_image *out_im
|
||||
ret_png = cellPngDecCreate(&mHandle, &InParam, &OutParam);
|
||||
|
||||
if (ret_png != CELL_OK)
|
||||
{
|
||||
SSNES_ERR("cellPngDecCreate\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
memset(&src, 0, sizeof(CellPngDecSrc));
|
||||
src.srcSelect = CELL_PNGDEC_FILE;
|
||||
@ -207,13 +215,21 @@ static bool ps3graphics_load_png(const char * path, struct texture_image *out_im
|
||||
|
||||
ret = cellPngDecOpen(mHandle, &sHandle, &src, &opnInfo);
|
||||
|
||||
|
||||
if (ret != CELL_OK)
|
||||
{
|
||||
SSNES_ERR("cellPngDecOpen\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
ret = cellPngDecReadHeader(mHandle, sHandle, &info);
|
||||
|
||||
|
||||
if (ret != CELL_OK)
|
||||
{
|
||||
SSNES_ERR("cellPngDecReadheader\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
inParam.commandPtr = NULL;
|
||||
inParam.outputMode = CELL_PNGDEC_TOP_TO_BOTTOM;
|
||||
@ -224,13 +240,20 @@ static bool ps3graphics_load_png(const char * path, struct texture_image *out_im
|
||||
ret = cellPngDecSetParameter(mHandle, sHandle, &inParam, &outParam);
|
||||
|
||||
if (ret != CELL_OK)
|
||||
{
|
||||
SSNES_ERR("cellPngDecSetParameter\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
dCtrlParam.outputBytesPerLine = outParam.outputWidth * 4;
|
||||
ret = cellPngDecDecodeData(mHandle, sHandle, (uint8_t*)out_img->pixels, &dCtrlParam, &dOutInfo);
|
||||
|
||||
|
||||
if (ret != CELL_OK || dOutInfo.status != CELL_PNGDEC_DEC_STATUS_FINISH)
|
||||
{
|
||||
SSNES_ERR("cellPngDecDecodeData\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
out_img->width = outParam.outputWidth;
|
||||
out_img->height = outParam.outputHeight;
|
||||
|
Loading…
Reference in New Issue
Block a user