Skip to content

Commit

Permalink
Simplify vi_is_active check
Browse files Browse the repository at this point in the history
  • Loading branch information
SpookyIluha committed Aug 26, 2023
1 parent 6077abd commit 37a9f52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 37a9f52

Please sign in to comment.