Skip to content
  • Lyndon Brown's avatar
    spu(audiobargraph,logo): fix buggy positioning with video filtering · 6b3c3d33
    Lyndon Brown authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
    the condition check with the comment "Ignore aligment if a position is
    given for video filter" is meant to force absolute mode if positive x/y
    values are given (in video filtering mode), causing a separate condition
    block to skip calculations for x/y. (it seems x/y offsets from relative
    positions are not supported in video filtering mode).
    
    problematically though, the condition check set the position value to
    `0` instead of `-1`, and the x/y calculation block condition checked
    for a non-zero value, which meant that:
     - center,center relative positioning was not possible (pos=0).
     - if position was set to `-1` (as per default) to signal absolute, and
       x/y were not both positive, the x/y calculation block would set about
       trying to calculate x/y based upon incorrectly reading alignment flags
       from the `-1` position value, thus calculating a bogus position.
    
    this commit fixes these issues by correctly signalling and checking for
    absolute mode.
    6b3c3d33