mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
DebugSurface: don't run ImGui::Begin if we aren't visible
Small optimization.
This commit is contained in:
parent
4d4fb66477
commit
74d8cdfb26
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user