From a9a2869765dcc50552eb5040ca640af7362d7dc2 Mon Sep 17 00:00:00 2001 From: Martin Donlon Date: Thu, 26 May 2022 03:09:40 -0700 Subject: [PATCH] Fix video_info (#623) video_info wasn't being updated correctly when `force` was set, it was getting overridden by the previous value because the `res_changed` check was false. --- video.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/video.cpp b/video.cpp index 5a3abff..bda2e96 100644 --- a/video.cpp +++ b/video.cpp @@ -1523,14 +1523,16 @@ static bool get_video_info(bool force, VideoInfo *video_info) video_info->interlaced = ( res & 0x100 ) != 0; video_info->rotated = ( res & 0x200 ) != 0; } + else + { + *video_info = current_video_info; + } DisableIO(); static uint8_t fb_crc = 0; uint8_t crc = spi_uio_cmd_cont(UIO_GET_FB_PAR); if (fb_crc != crc || force || res_changed) { - if (!res_changed) *video_info = current_video_info; - fb_changed |= (fb_crc != crc); fb_crc = crc; video_info->arx = spi_w(0);