From 2689cec2ca9e553621410272b2c3e71ddc05c210 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Thu, 10 Aug 2023 19:28:04 -0700 Subject: [PATCH] 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 --- src/win32.rs | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/src/win32.rs b/src/win32.rs index 3b99bf7..6559e36 100644 --- a/src/win32.rs +++ b/src/win32.rs @@ -231,30 +231,7 @@ impl Win32Impl { /// Fetch the buffer from the window. pub fn fetch(&mut self) -> Result, 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) } }