diff --git a/gfx/image.h b/gfx/image.h index 3a1f07c89b..3307a769a8 100644 --- a/gfx/image.h +++ b/gfx/image.h @@ -25,7 +25,11 @@ struct texture_image { unsigned width; unsigned height; +#ifdef __CELLOS_LV2__ + uint8_t *pixels; +#else uint32_t *pixels; +#endif }; bool texture_image_load(const char *path, struct texture_image* img); diff --git a/ps3/image.c b/ps3/image.c index 8dd2d7c868..bdb604e5c6 100644 --- a/ps3/image.c +++ b/ps3/image.c @@ -94,10 +94,7 @@ static bool ps3graphics_load_jpeg(const char * path, struct texture_image *out_i ret_jpeg = cellJpgDecCreate(&mHandle, &InParam, &OutParam); if (ret_jpeg != CELL_OK) - { - SSNES_ERR("cellJpgDecCreate\n"); goto error; - } memset(&src, 0, sizeof(CellJpgDecSrc)); src.srcSelect = CELL_JPGDEC_FILE; @@ -112,18 +109,12 @@ static bool ps3graphics_load_jpeg(const char * path, struct texture_image *out_i ret = cellJpgDecOpen(mHandle, &sHandle, &src, &opnInfo); if (ret != CELL_OK) - { - SSNES_ERR("cellJpgDecOpen\n"); goto error; - } ret = cellJpgDecReadHeader(mHandle, sHandle, &info); if (ret != CELL_OK) - { - SSNES_ERR("cellJpgDecReadHeader\n"); goto error; - } inParam.commandPtr = NULL; inParam.method = CELL_JPGDEC_FAST; @@ -134,19 +125,13 @@ static bool ps3graphics_load_jpeg(const char * path, struct texture_image *out_i ret = cellJpgDecSetParameter(mHandle, sHandle, &inParam, &outParam); if (ret != CELL_OK) - { - SSNES_ERR("cellJpgDecSetParameter\n"); goto error; - } dCtrlParam.outputBytesPerLine = outParam.outputWidth * 4; - ret = cellJpgDecDecodeData(mHandle, sHandle, (uint8_t*)out_img->pixels, &dCtrlParam, &dOutInfo); + ret = cellJpgDecDecodeData(mHandle, sHandle, out_img->pixels, &dCtrlParam, &dOutInfo); if (ret != CELL_OK || dOutInfo.status != CELL_JPGDEC_DEC_STATUS_FINISH) - { - SSNES_ERR("cellJpgDecDecodeData\n"); goto error; - } out_img->width = outParam.outputWidth; out_img->height = outParam.outputHeight; @@ -198,10 +183,7 @@ 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; @@ -217,19 +199,13 @@ static bool ps3graphics_load_png(const char * path, struct texture_image *out_im 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; @@ -240,20 +216,14 @@ 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); + ret = cellPngDecDecodeData(mHandle, sHandle, 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; diff --git a/ps3/main.c b/ps3/main.c index 4accc7cafc..bf68839575 100644 --- a/ps3/main.c +++ b/ps3/main.c @@ -492,6 +492,7 @@ int main(int argc, char *argv[]) // Initialize 6 SPUs but reserve 1 SPU as a raw SPU for PSGL sys_spu_initialize(6, 1); + cellSysmoduleLoadModule(CELL_SYSMODULE_IO); cellSysmoduleLoadModule(CELL_SYSMODULE_FS); cellSysmoduleLoadModule(CELL_SYSMODULE_SYSUTIL_GAME); cellSysmoduleLoadModule(CELL_SYSMODULE_AVCONF_EXT); diff --git a/ps3/pkg/USRDIR/borders/Menu/main-menu.jpg b/ps3/pkg/USRDIR/borders/Menu/main-menu.jpg index efd2eb6f06..9d02019594 100644 Binary files a/ps3/pkg/USRDIR/borders/Menu/main-menu.jpg and b/ps3/pkg/USRDIR/borders/Menu/main-menu.jpg differ diff --git a/ps3/ps3_video_psgl.c b/ps3/ps3_video_psgl.c index ee938fa79e..f6e41ac938 100644 --- a/ps3/ps3_video_psgl.c +++ b/ps3/ps3_video_psgl.c @@ -1143,6 +1143,8 @@ bool ps3_setup_texture(void) glGenTextures(1, &menu_texture_id); SSNES_LOG("Loading texture image for menu...\n"); + menu_texture.pixels = memalign(128, 2048 * 2048 * 4); + memset(menu_texture.pixels, 0, (2048 * 2048 * 4)); if(!texture_image_load(DEFAULT_MENU_BORDER_FILE, &menu_texture)) { SSNES_ERR("Failed to load texture image for menu\n");