From b17b057890f4e5d2ab15316ac7bf4698ab46b533 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 8 Mar 2025 12:31:55 +0100 Subject: [PATCH] ap_changes no longer set if there was no actual change --- config.cpp | 9 ++++++--- screenshot.cpp | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/config.cpp b/config.cpp index 88689ce8..747cbe27 100644 --- a/config.cpp +++ b/config.cpp @@ -222,8 +222,9 @@ template struct enum_parameter : list_parameter { bool load_from_animation(const string& s) override { if(anim_value != *value) return false; load(s); + bool changed = anim_value != *value; anim_value = *value; - return true; + return changed; } void load_as_animation(const string& s) override { load(s); @@ -278,8 +279,9 @@ template struct val_parameter : public parameter { bool load_from_animation(const string& s) override { if(anim_value != *value) return false; load(s); + bool changed = anim_value != *value; anim_value = *value; - return true; + return changed; } void load_as_animation(const string& s) override { load(s); @@ -512,8 +514,9 @@ struct custom_parameter : public parameter { bool load_from_animation(const string& s) override { if(anim_value != get_cld()) return false; load(s); + auto bak = anim_value; anim_value = get_cld(); - return true; + return anim_value != bak; } void load_as_animation(const string& s) override { load(s); diff --git a/screenshot.cpp b/screenshot.cpp index 19ccc731..f3924967 100644 --- a/screenshot.cpp +++ b/screenshot.cpp @@ -1220,7 +1220,7 @@ EX void animate_parameter(parameter *par, string f) { aps.emplace_back(animated_parameter{par, f}); } -int ap_changes; +EX int ap_changes; void apply_animated_parameters() { ap_changes = 0;