Skip to content

Instantly share code, notes, and snippets.

@Milek7

Milek7/ogl.diff Secret

Created May 19, 2021 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Milek7/59264f56d96e5ac4b29c972e7b7ba4ec to your computer and use it in GitHub Desktop.
Save Milek7/59264f56d96e5ac4b29c972e7b7ba4ec to your computer and use it in GitHub Desktop.
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index 2f5cf419a..843dab80c 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -1461,8 +1461,13 @@ void *VideoDriver_Win32OpenGL::GetVideoPointer()
void VideoDriver_Win32OpenGL::ReleaseVideoPointer()
{
- if (this->anim_buffer != nullptr) OpenGLBackend::Get()->ReleaseAnimBuffer(this->dirty_rect);
- OpenGLBackend::Get()->ReleaseVideoBuffer(this->dirty_rect);
+ Rect re;
+ re.left = 0;
+ re.top = 0;
+ re.right = this->width;
+ re.bottom = this->height;
+ if (this->anim_buffer != nullptr) OpenGLBackend::Get()->ReleaseAnimBuffer(re);
+ OpenGLBackend::Get()->ReleaseVideoBuffer(re);
this->dirty_rect = {};
_screen.dst_ptr = nullptr;
this->anim_buffer = nullptr;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment