diff --git a/src/doompanning.cc b/src/doompanning.cc index 13a0979..e4a2e3f 100644 --- a/src/doompanning.cc +++ b/src/doompanning.cc @@ -199,7 +199,7 @@ int doom_controller_loop(ControllerContext &ctx) return 0; } -void log_to_context(log_Event *ev) +void log_to_imgui(log_Event *ev) { auto ctx = reinterpret_cast(ev->udata); ctx->appLog.AddLog(ev->fmt, ev->ap); @@ -258,7 +258,7 @@ int main(int argc, char *argv[]) {}, }; - log_add_callback(log_to_context, &ctx, LOG_TRACE); + log_add_callback(log_to_imgui, &ctx, LOG_TRACE); int ret = doom_controller_loop(ctx); diff --git a/src/dp_util.hpp b/src/dp_util.hpp index 4fdb6ff..53f2eac 100644 --- a/src/dp_util.hpp +++ b/src/dp_util.hpp @@ -31,6 +31,9 @@ template return buf.data(); } +// Copied from the ImGui demo code. Added the AddLog() overload taking a +// va_list. + // Usage: // static ExampleAppLog my_log; // my_log.AddLog("Hello %d world\n", 123);