From a723a833a85de908a8120637c9093ccd42ee72d4 Mon Sep 17 00:00:00 2001 From: rz5 Date: Fri, 25 Oct 2019 01:15:07 +0100 Subject: [PATCH] (video_driver_frame) Cache frame before converting 0RGB1555 (#9629) * (video_driver_frame) Don't convert 0RGB1555 when menu is active Fixes the color cycling that happens when the menu is up and the core's internal pixel format is 0RGB1555. This happened because video_driver_scaler would keep converting from 0RGB1555 to RGB565, even when the core was paused. * Update retroarch.c * Update retroarch.c --- retroarch.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/retroarch.c b/retroarch.c index b5d1e3fc12..559baada75 100644 --- a/retroarch.c +++ b/retroarch.c @@ -19637,8 +19637,14 @@ static void video_driver_frame(const void *data, unsigned width, if (!video_driver_active) return; + if (data) + frame_cache_data = data; + frame_cache_width = width; + frame_cache_height = height; + frame_cache_pitch = pitch; + if ( - video_driver_scaler_ptr + video_driver_scaler_ptr && data && (video_driver_pix_fmt == RETRO_PIXEL_FORMAT_0RGB1555) && (data != RETRO_HW_FRAME_BUFFER_VALID) @@ -19652,12 +19658,6 @@ static void video_driver_frame(const void *data, unsigned width, pitch = video_driver_scaler_ptr->scaler->out_stride; } - if (data) - frame_cache_data = data; - frame_cache_width = width; - frame_cache_height = height; - frame_cache_pitch = pitch; - video_driver_build_info(&video_info); /* Get the amount of frames per seconds. */