diff --git a/plugins/obs-text/gdiplus/obs-text.cpp b/plugins/obs-text/gdiplus/obs-text.cpp index 8a040beac..2efc10814 100644 --- a/plugins/obs-text/gdiplus/obs-text.cpp +++ b/plugins/obs-text/gdiplus/obs-text.cpp @@ -197,6 +197,7 @@ struct TextSource { bool read_from_file = false; string file; time_t file_timestamp = 0; + bool update_file = false; float update_time_elapsed = 0.0f; wstring text; @@ -775,10 +776,15 @@ inline void TextSource::Tick(float seconds) time_t t = get_modified_timestamp(file.c_str()); update_time_elapsed = 0.0f; - if (file_timestamp != t) { + if (update_file) { LoadFileText(); RenderText(); + update_file = false; + } + + if (file_timestamp != t) { file_timestamp = t; + update_file = true; } } }