Refactor init_video_pixel_converter
This commit is contained in:
parent
de76884bb8
commit
4d9805b79c
8
driver.c
8
driver.c
|
@ -350,8 +350,11 @@ static bool init_video_pixel_converter(unsigned size)
|
||||||
* without deiniting first on consoles. */
|
* without deiniting first on consoles. */
|
||||||
deinit_pixel_converter();
|
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");
|
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;
|
driver.scaler.scaler_type = SCALER_TYPE_POINT;
|
||||||
|
@ -364,7 +367,6 @@ static bool init_video_pixel_converter(unsigned size)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
driver.scaler_out = calloc(sizeof(uint16_t), size * size);
|
driver.scaler_out = calloc(sizeof(uint16_t), size * size);
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue