diff --git a/examples/live.rs b/examples/live.rs index 8341a4c..dfa374c 100644 --- a/examples/live.rs +++ b/examples/live.rs @@ -126,7 +126,7 @@ fn main() -> anyhow::Result<()> { }; let g = frame[i * 2]; let b = frame[i * 2 + 1]; - let out_i = (y + x * HEIGHT) * 2; + let out_i = ((HEIGHT - 1 - y) + (WIDTH - 1 - x) * HEIGHT) * 4; swapped[out_i..out_i + 4].copy_from_slice(&[0, r, g, b]); } }