From 585978982e37623249e65d2334fd0715af0e8a93 Mon Sep 17 00:00:00 2001 From: Yuval Dolev Date: Mon, 13 Jan 2020 04:20:10 +0200 Subject: [PATCH] Updates to the step scheduling to improve animations. --- platform_mac/mac_4ed.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform_mac/mac_4ed.mm b/platform_mac/mac_4ed.mm index e8b58a63..5f444f51 100644 --- a/platform_mac/mac_4ed.mm +++ b/platform_mac/mac_4ed.mm @@ -630,6 +630,8 @@ glue(_i_, __LINE__) = 1, mac_profile(name, glue(_begin_, __LINE__), system_now_t u64 prev_timer_start; MacProfileScope("Draw Rect"){ + mac_vars.step_requested = false; + MacProfileScope("Acquire Frame Mutex"){ // NOTE(yuval): Read comment in win32_4ed.cpp's main loop system_mutex_acquire(mac_vars.global_frame_mutex); @@ -827,7 +829,6 @@ glue(_i_, __LINE__) = 1, mac_profile(name, glue(_begin_, __LINE__), system_now_t MacProfileScope("Cleanup"){ mac_vars.first = false; - mac_vars.step_requested = false; linalloc_clear(mac_vars.frame_arena); @@ -985,6 +986,7 @@ glue(_i_, __LINE__) = 1, mac_profile(name, glue(_begin_, __LINE__), system_now_t } - (void)request_display{ + printf("Display Requested!\n"); CGRect cg_rect = CGRectMake(0, 0, mac_vars.width, mac_vars.height); NSRect rect = NSRectFromCGRect(cg_rect); [self setNeedsDisplayInRect:rect];