Refactor init_video_pixel_converter

This commit is contained in:
twinaphex 2015-01-18 20:19:40 +01:00
parent de76884bb8
commit 4d9805b79c
1 changed files with 13 additions and 11 deletions

View File

@ -350,8 +350,11 @@ static bool init_video_pixel_converter(unsigned size)
* without deiniting first on consoles. */
deinit_pixel_converter();
if (g_extern.system.pix_fmt == RETRO_PIXEL_FORMAT_0RGB1555)
{
/* If pixel format is not 0RGB1555, we don't need to do
* any internal pixel conversion. */
if (g_extern.system.pix_fmt != RETRO_PIXEL_FORMAT_0RGB1555)
return true;
RARCH_WARN("0RGB1555 pixel format is deprecated, and will be slower. For 15/16-bit, RGB565 format is preferred.\n");
driver.scaler.scaler_type = SCALER_TYPE_POINT;
@ -364,7 +367,6 @@ static bool init_video_pixel_converter(unsigned size)
return false;
driver.scaler_out = calloc(sizeof(uint16_t), size * size);
}
return true;
}