mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Prevent early returns for video_frame_pixel_scale
This commit is contained in:
parent
483cd0077c
commit
49893c10f5
@ -569,7 +569,7 @@ static bool init_video_pixel_converter(unsigned size)
|
||||
|
||||
/* If pixel format is not 0RGB1555, we don't need to do
|
||||
* any internal pixel conversion. */
|
||||
if (video_driver_get_pixel_format() != RETRO_PIXEL_FORMAT_0RGB1555)
|
||||
if (video_driver_pix_fmt != RETRO_PIXEL_FORMAT_0RGB1555)
|
||||
return true;
|
||||
|
||||
/* No need to perform pixel conversion for HW rendering contexts. */
|
||||
@ -2083,7 +2083,9 @@ void video_driver_frame(const void *data, unsigned width,
|
||||
if (!video_driver_is_active())
|
||||
return;
|
||||
|
||||
if (video_driver_scaler_ptr &&
|
||||
if (video_driver_scaler_ptr && data &&
|
||||
(video_driver_pix_fmt == RETRO_PIXEL_FORMAT_0RGB1555) &&
|
||||
(data != RETRO_HW_FRAME_BUFFER_VALID) &&
|
||||
video_pixel_frame_scale(
|
||||
video_driver_scaler_ptr->scaler,
|
||||
video_driver_scaler_ptr->scaler_out,
|
||||
|
@ -200,13 +200,6 @@ bool video_pixel_frame_scale(
|
||||
static struct retro_perf_counter video_frame_conv = {0};
|
||||
|
||||
performance_counter_init(&video_frame_conv, "video_frame_conv");
|
||||
|
||||
if ( !data
|
||||
|| video_driver_get_pixel_format() != RETRO_PIXEL_FORMAT_0RGB1555)
|
||||
return false;
|
||||
if (data == RETRO_HW_FRAME_BUFFER_VALID)
|
||||
return false;
|
||||
|
||||
performance_counter_start(&video_frame_conv);
|
||||
|
||||
scaler->in_width = width;
|
||||
|
Loading…
Reference in New Issue
Block a user