From 37a9f52ad8ed23c69204e512e885ef7d46d1f7c5 Mon Sep 17 00:00:00 2001 From: SpookyIluha <127010686+SpookyIluha@users.noreply.github.com> Date: Sat, 26 Aug 2023 19:36:18 +0500 Subject: [PATCH] Simplify vi_is_active check --- src/vi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vi.h b/src/vi.h index cf19948b0b..d6fd4adce2 100644 --- a/src/vi.h +++ b/src/vi.h @@ -259,7 +259,7 @@ static inline void vi_wait_for_vblank() /** @brief Return true if VI is sending a video signal (16-bit or 32-bit color set) */ static inline bool vi_is_active() { - return ((*VI_CTRL & VI_CTRL_TYPE) > VI_CTRL_TYPE_BLANK? true : false); + return (*VI_CTRL & VI_CTRL_TYPE) != VI_CTRL_TYPE_BLANK; } /** @brief Set active image width to 0, which keeps VI signal active but only sending a blank image */