Skip to content

Commit 9ea2c43

Browse files
committed
fixed manually close internal windows
1 parent b26aa4b commit 9ea2c43

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/core/imgui_profiler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ class ProfilersWindow {
329329

330330
void setIsRetina(bool ir) { isRetina = ir; if(ir) scaleFactor = 2.0f; cpuGraph.setIsRetina(ir); gpuGraph.setIsRetina(ir); }
331331

332-
void Render()
332+
void Render(bool *active)
333333
{
334334
fpsFramesCount++;
335335
auto currFrameTime = std::chrono::system_clock::now();
@@ -350,7 +350,7 @@ class ProfilersWindow {
350350
title.precision(2);
351351
title << std::fixed << "Profiler [Rendering at " << 1.0f / avgFrameTime << "fps\t" << avgFrameTime * 1000.0f << "ms]###ProfilerWindow";
352352
//###AnimatedTitle
353-
ImGui::Begin(title.str().c_str(), 0, ImGuiWindowFlags_NoScrollbar);
353+
ImGui::Begin(title.str().c_str(), active, ImGuiWindowFlags_NoScrollbar);
354354
ImVec2 canvasSize = ImGui::GetContentRegionAvail();
355355

356356
int sizeMargin = int(ImGui::GetStyle().ItemSpacing.y);

src/ofxVisualProgramming.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ void ofxVisualProgramming::draw(){
284284

285285
// PROFILER
286286
if(profilerActive){
287-
profiler.Render();
287+
profiler.Render(&profilerActive);
288288
}
289289

290290
// Try to begin ImGui Canvas.

0 commit comments

Comments
 (0)