提交 c8a81bba 编写于 作者: R Ryan Foster

image-source: Reload file when timestamp has changed

This commit fixes the issue outlined in the following thread:
https://obsproject.com/forum/threads/50045/

When the image source file was replaced by an outside process, it would
only reload when the file's new timestamp was newer than the file's
previous timestamp.  This fixes that behavior.  Now an image source
will reload any time the file's new timestamp is different than its
previous timestamp.
上级 001f3c75
......@@ -207,7 +207,7 @@ static void image_source_tick(void *data, float seconds)
time_t t = get_modified_timestamp(context->file);
context->update_time_elapsed = 0.0f;
if (context->file_timestamp < t) {
if (context->file_timestamp != t) {
image_source_load(context);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册