From 072c57b0ca6523df27366c010c37934d7a0eede5 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sat, 21 Mar 2015 19:30:46 +0000 Subject: [PATCH] Setting io.LogFilename to NULL disable default LogToFile() (part of #175) --- imgui.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/imgui.cpp b/imgui.cpp index 12e25ca4..a97d0771 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -4394,7 +4394,11 @@ void ImGui::LogToFile(int max_depth, const char* filename) if (g.LogEnabled) return; if (!filename) + { filename = g.IO.LogFilename; + if (!filename) + return; + } g.LogFile = fopen(filename, "ab"); if (!g.LogFile)