Skip to content

Commit

Permalink
micro optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Oct 25, 2023
1 parent b558835 commit 1c1519c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions glfw/cocoa_init.m
Original file line number Diff line number Diff line change
Expand Up @@ -1021,10 +1021,9 @@ void _glfwPlatformTerminate(void)
void _glfwDispatchTickCallback(void) {
if (tick_lock && tick_callback) {
while(true) {
bool do_call = true;
bool do_call = false;
[tick_lock lock];
if (!tick_callback_requested) do_call = false;
tick_callback_requested = false;
if (tick_callback_requested) { do_call = true; tick_callback_requested = false; }
[tick_lock unlock];
if (do_call) tick_callback(tick_callback_data);
else break;
Expand Down

0 comments on commit 1c1519c

Please sign in to comment.