DebugSurface: don't run ImGui::Begin if we aren't visible

Small optimization.
This commit is contained in:
Kawe Mazidjatari 2025-01-08 21:23:31 +01:00
parent 4d4fb66477
commit 74d8cdfb26
2 changed files with 6 additions and 0 deletions

View File

@ -191,6 +191,9 @@ void CBrowser::RunTask()
//-----------------------------------------------------------------------------
bool CBrowser::DrawSurface(void)
{
if (!IsVisible())
return false;
if (!ImGui::Begin(m_surfaceLabel, &m_activated, ImGuiWindowFlags_None, &ResetInput))
{
ImGui::End();

View File

@ -186,6 +186,9 @@ void CConsole::RunFrame(void)
//-----------------------------------------------------------------------------
bool CConsole::DrawSurface(void)
{
if (!IsVisible())
return false;
if (!ImGui::Begin(m_surfaceLabel, &m_activated, ImGuiWindowFlags_None, &ResetInput))
{
ImGui::End();