Skip to content

Commit

Permalink
forgot to update windows impl
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysonmaw committed Sep 11, 2024
1 parent b8f4fda commit 459297f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/backends/win32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,14 @@ impl<'a, D: HasDisplayHandle, W: HasWindowHandle, A: BufferReturn> BufferInterfa
self.0.buffer.as_mut().unwrap().pixels_mut()
}

fn pixels_rgb(&self) -> &[<A as BufferReturn>::Output] {
unsafe {
std::mem::transmute::<&[u32], &[<A as BufferReturn>::Output]>(
self.0.buffer.as_ref().unwrap().pixels(),
)
}
}

fn pixels_rgb_mut(&mut self) -> &mut [<A as BufferReturn>::Output] {
unsafe {
std::mem::transmute::<&mut [u32], &mut [<A as BufferReturn>::Output]>(
Expand Down

0 comments on commit 459297f

Please sign in to comment.