Skip to content

Commit

Permalink
修正了在 MacOS 10.11 下无法正常使用的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Caldis committed Feb 21, 2017
1 parent 5f52aa7 commit a6e3549
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Mos.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -689,7 +689,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down
4 changes: 2 additions & 2 deletions Mos/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.2</string>
<string>1.4.4</string>
<key>CFBundleVersion</key>
<string>20170210</string>
<string>20170221</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
16 changes: 8 additions & 8 deletions Mos/ScrollCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ class ScrollCore: NSObject {

// 事件发送器 (CVDisplayLink)
static func initScrollEventPoster() {
// 新建一个CVDisplayHandler来执行循环
// 新建一个CVDisplayLinkSetOutputCallback来执行循环
CVDisplayLinkCreateWithActiveCGDisplays(&ScrollCore.scrollEventPoster)
CVDisplayLinkSetOutputHandler(ScrollCore.scrollEventPoster!, {
(displayLink, inNow, inOutputTime, flagsIn, flagsOut) -> CVReturn in
// TODO: 处理X轴数据
// 处理Y轴事件
ScrollCore.handleScrollY()
return kCVReturnSuccess
})
CVDisplayLinkSetOutputCallback(ScrollCore.scrollEventPoster!, {
(displayLink, inNow, inOutputTime, flagsIn, flagsOut, displayLinkContext) -> CVReturn in
// TODO: 处理X轴数据
// 处理Y轴事件
ScrollCore.handleScrollY()
return kCVReturnSuccess
}, nil)
}
static func activeScrollEventPoster() {
ScrollCore.updateRealPluseData(Y: ScrollCore.scrollRef.Y, X: ScrollCore.scrollRef.X)
Expand Down

0 comments on commit a6e3549

Please sign in to comment.