From 8ea7673a44932f0964b5626ae9b34bb72d9b074f Mon Sep 17 00:00:00 2001 From: danzel Date: Sun, 13 Aug 2017 10:58:04 +1200 Subject: [PATCH] Log script finishing. Fixed logging crashing too, woops --- src/common/logging/backend.cpp | 1 + src/scripted_input/script_runner.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 4b83eeb28..bcbf0690c 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp @@ -73,6 +73,7 @@ namespace Log { SUB(Audio, Sink) \ CLS(Input) \ CLS(Network) \ + CLS(ScriptedInput) \ CLS(Loader) \ CLS(WebService) diff --git a/src/scripted_input/script_runner.cpp b/src/scripted_input/script_runner.cpp index 6c977e397..c60c9302b 100644 --- a/src/scripted_input/script_runner.cpp +++ b/src/scripted_input/script_runner.cpp @@ -104,6 +104,10 @@ void ScriptRunner::NotifyFrameFinished() { scripted_buttons.get()->SetActiveButtons(script[script_index].buttons_active); } } + + if (script_index >= script.size()) { + LOG_INFO(ScriptedInput, "Scripted Input finished at frame %i", frame_number); + } } void ScriptRunner::SaveScreenshot() {