mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-15 02:11:22 +00:00
Don't call into SwapBuffers if no window is associated with the DC
This commit is contained in:
1 parent
1b8d291874
commit
4242c12226
1 file changed
+7
-4
@@ -523,12 +523,15 @@ class OpenGLHook : LibraryHook
|
||||
{
|
||||
HWND w = WindowFromDC(dc);
|
||||
|
||||
RECT r;
|
||||
GetClientRect(w, &r);
|
||||
if(w != NULL)
|
||||
{
|
||||
RECT r;
|
||||
GetClientRect(w, &r);
|
||||
|
||||
glhooks.GetDriver()->WindowSize(w, r.right-r.left, r.bottom-r.top);
|
||||
glhooks.GetDriver()->WindowSize(w, r.right - r.left, r.bottom - r.top);
|
||||
|
||||
glhooks.GetDriver()->SwapBuffers(w);
|
||||
glhooks.GetDriver()->SwapBuffers(w);
|
||||
}
|
||||
|
||||
return glhooks.SwapBuffers_hook()(dc);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user