ext/say_target.c in ray-0.2.0 vs ext/say_target.c in ray-0.2.1

- old
+ new

@@ -1,10 +1,7 @@ #include "say.h" -static say_target *say_current_target = NULL; -static say_context *say_target_last_context = NULL; - static void say_target_update_states(say_target *target) { if (target->up_to_date) { target->up_to_date = 0; say_renderer_reset_states(target->renderer); } @@ -104,23 +101,21 @@ say_context *context = say_target_get_context(target); if (context) { say_context *current = say_context_current(); - if (current == say_target_last_context && - target == say_current_target && - current == context) { + if (current == context && + current->target == target) { return 1; } target->view_up_to_date = 0; say_context_make_current(context); if (target->bind_hook) target->bind_hook(target->data); - say_current_target = target; - say_target_last_context = context; + current->target = target; return 1; } else return 0;