Browse Source

Make sure idle callback runs on same thread that created timer (macOS)

pull/360/head
Luciano Iam 4 years ago
parent
commit
805fa51482
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      distrho/src/DistrhoUIVST3.cpp

+ 2
- 2
distrho/src/DistrhoUIVST3.cpp View File

@@ -735,12 +735,12 @@ private:
ctx.info = this;
fTimer = CFRunLoopTimerCreate(kCFAllocatorDefault, CFAbsoluteTimeGetCurrent() + t, t, 0, 0,
UIVst3::nativeIdleTimerCallback, &ctx);
CFRunLoopAddTimer(CFRunLoopGetMain(), fTimer, kCFRunLoopCommonModes);
CFRunLoopAddTimer(CFRunLoopGetCurrent(), fTimer, kCFRunLoopCommonModes);
}

void nativeIdleTimerDestroy()
{
CFRunLoopRemoveTimer(CFRunLoopGetMain(), fTimer, kCFRunLoopCommonModes);
CFRunLoopRemoveTimer(CFRunLoopGetCurrent(), fTimer, kCFRunLoopCommonModes);
CFRelease(fTimer);
}



Loading…
Cancel
Save