diff options
Diffstat (limited to 'src/video')
-rw-r--r-- | src/video/opengl.cpp | 1 | ||||
-rw-r--r-- | src/video/sdl2_opengl_v.cpp | 2 | ||||
-rw-r--r-- | src/video/win32_v.cpp | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/src/video/opengl.cpp b/src/video/opengl.cpp index 1eab9b10e..ecafeb613 100644 --- a/src/video/opengl.cpp +++ b/src/video/opengl.cpp @@ -1154,6 +1154,7 @@ void *OpenGLBackend::GetVideoBuffer() #endif if (!this->persistent_mapping_supported) { + assert(this->vid_buffer == nullptr); _glBindBuffer(GL_PIXEL_UNPACK_BUFFER, this->vid_pbo); this->vid_buffer = _glMapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_READ_WRITE); } else if (this->vid_buffer == nullptr) { diff --git a/src/video/sdl2_opengl_v.cpp b/src/video/sdl2_opengl_v.cpp index 9c84c36b1..003e19438 100644 --- a/src/video/sdl2_opengl_v.cpp +++ b/src/video/sdl2_opengl_v.cpp @@ -74,6 +74,8 @@ const char *VideoDriver_SDL_OpenGL::Start(const StringList ¶m) this->Stop(); return "Can't get pointer to screen buffer"; } + /* Main loop expects to start with the buffer unmapped. */ + this->ReleaseVideoPointer(); return nullptr; } diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp index 1dc1db8ce..f0291db71 100644 --- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -1311,6 +1311,8 @@ const char *VideoDriver_Win32OpenGL::Start(const StringList ¶m) _cur_resolution = old_res; return "Can't get pointer to screen buffer"; } + /* Main loop expects to start with the buffer unmapped. */ + this->ReleaseVideoPointer(); MarkWholeScreenDirty(); |