diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 6c75b1819..1a219c3b1 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -1240,11 +1240,11 @@ bool Monitor::CheckSignal( const Image *image ) if(colours == ZM_COLOUR_GRAY8) { if ( *(buffer+index) != grayscale_val ) - return true; - + return true; + } else if(colours == ZM_COLOUR_RGB24) { const uint8_t *ptr = buffer+(index*colours); - + if ( usedsubpixorder == ZM_SUBPIX_ORDER_BGR) { if ( (RED_PTR_BGRA(ptr) != red_val) || (GREEN_PTR_BGRA(ptr) != green_val) || (BLUE_PTR_BGRA(ptr) != blue_val) ) return true; @@ -1253,17 +1253,17 @@ bool Monitor::CheckSignal( const Image *image ) if ( (RED_PTR_RGBA(ptr) != red_val) || (GREEN_PTR_RGBA(ptr) != green_val) || (BLUE_PTR_RGBA(ptr) != blue_val) ) return true; } - + } else if(colours == ZM_COLOUR_RGB32) { if ( usedsubpixorder == ZM_SUBPIX_ORDER_ARGB || usedsubpixorder == ZM_SUBPIX_ORDER_ABGR) { if ( ARGB_ABGR_ZEROALPHA(*(((const Rgb*)buffer)+index)) != ARGB_ABGR_ZEROALPHA(colour_val) ) return true; } else { - /* Assume RGBA or BGRA */ - if ( RGBA_BGRA_ZEROALPHA(*(((const Rgb*)buffer)+index)) != RGBA_BGRA_ZEROALPHA(colour_val) ) - return true; - } + /* Assume RGBA or BGRA */ + if ( RGBA_BGRA_ZEROALPHA(*(((const Rgb*)buffer)+index)) != RGBA_BGRA_ZEROALPHA(colour_val) ) + return true; } + } } return( false );