bugfix: Mark fetch as unsupported on Windows for now
This fetch function has been broken and is probably unsound. This also fixes the flakey Windows CI that we've been dealing with. Signed-off-by: John Nunley <dev@notgull.net>
This commit is contained in:
parent
5463e8741e
commit
2689cec2ca
1 changed files with 1 additions and 24 deletions
25
src/win32.rs
25
src/win32.rs
|
|
@ -231,30 +231,7 @@ impl Win32Impl {
|
|||
|
||||
/// Fetch the buffer from the window.
|
||||
pub fn fetch(&mut self) -> Result<Vec<u32>, SoftBufferError> {
|
||||
let buffer = self.buffer.as_ref().unwrap();
|
||||
let temp_buffer = Buffer::new(self.dc, buffer.width, buffer.height);
|
||||
|
||||
// Just go the other way.
|
||||
unsafe {
|
||||
Gdi::BitBlt(
|
||||
temp_buffer.dc,
|
||||
0,
|
||||
0,
|
||||
temp_buffer.width.get(),
|
||||
temp_buffer.height.get(),
|
||||
self.dc,
|
||||
0,
|
||||
0,
|
||||
Gdi::SRCCOPY,
|
||||
);
|
||||
}
|
||||
|
||||
// Flush the operation so that it happens immediately.
|
||||
unsafe {
|
||||
Gdi::GdiFlush();
|
||||
}
|
||||
|
||||
Ok(temp_buffer.pixels().to_vec())
|
||||
Err(SoftBufferError::Unimplemented)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue