From 55d814182f4c2d66eefaea38cdcadd82490f97ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=89=E5=9D=A4?= Date: Mon, 10 Jan 2022 11:57:19 +0800 Subject: [PATCH] fix: build error on macos --- QtScrcpy/util/mousetap/cocoamousetap.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/QtScrcpy/util/mousetap/cocoamousetap.mm b/QtScrcpy/util/mousetap/cocoamousetap.mm index 67c009f..8664c01 100644 --- a/QtScrcpy/util/mousetap/cocoamousetap.mm +++ b/QtScrcpy/util/mousetap/cocoamousetap.mm @@ -183,7 +183,8 @@ void CocoaMouseTap::run() m_tapData->runloop = CFRunLoopGetCurrent(); CFRunLoopAddSource(m_tapData->runloop, m_tapData->runloopSource, kCFRunLoopCommonModes); - CFRunLoopTimerContext context = {.info = &m_runloopStartedSemaphore}; + CFRunLoopTimerContext context{}; + context.info = &m_runloopStartedSemaphore; /* We signal the runloop started semaphore *after* the run loop has started, indicating it's safe to CFRunLoopStop it. */ CFRunLoopTimerRef timer = CFRunLoopTimerCreate(kCFAllocatorDefault, CFAbsoluteTimeGetCurrent(), 0, 0, 0, &SemaphorePostCallback, &context); CFRunLoopAddTimer(m_tapData->runloop, timer, kCFRunLoopCommonModes);