Check if we actually created a new frame

This commit is contained in:
Nemirtingas 2020-01-10 08:10:33 +01:00
parent 548f21c2f0
commit 0711c83440
5 changed files with 60 additions and 51 deletions

View file

@ -83,16 +83,18 @@ void OpenGL_Hook::prepareForOverlay(HDC hDC)
initialized = true;
}
ImGui_ImplOpenGL3_NewFrame();
Windows_Hook::Inst()->prepareForOverlay(hWnd);
if (ImGui_ImplOpenGL3_NewFrame())
{
Windows_Hook::Inst()->prepareForOverlay(hWnd);
ImGui::NewFrame();
ImGui::NewFrame();
get_steam_client()->steam_overlay->OverlayProc();
get_steam_client()->steam_overlay->OverlayProc();
ImGui::Render();
ImGui::Render();
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
}
}
BOOL WINAPI OpenGL_Hook::MywglSwapBuffers(HDC hDC)