Skip to content

Commit 0285073

Browse files
authored
Merge pull request #21 from ther0n/disable-mouse-accel-fix
Fixes issue #20
2 parents 91cde77 + 0a6124e commit 0285073

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

UnnaturalScrollWheels.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@
313313
"@executable_path/../Frameworks",
314314
);
315315
MACOSX_DEPLOYMENT_TARGET = 10.13;
316-
MARKETING_VERSION = 1.2.1;
316+
MARKETING_VERSION = 1.2.2;
317317
PRODUCT_BUNDLE_IDENTIFIER = com.theron.UnnaturalScrollWheels;
318318
PRODUCT_NAME = "$(TARGET_NAME)";
319319
SWIFT_OBJC_BRIDGING_HEADER = "UnnaturalScrollWheels/UnnaturalScrollWheels-Bridging-Header.h";
@@ -339,7 +339,7 @@
339339
"@executable_path/../Frameworks",
340340
);
341341
MACOSX_DEPLOYMENT_TARGET = 10.13;
342-
MARKETING_VERSION = 1.2.1;
342+
MARKETING_VERSION = 1.2.2;
343343
PRODUCT_BUNDLE_IDENTIFIER = com.theron.UnnaturalScrollWheels;
344344
PRODUCT_NAME = "$(TARGET_NAME)";
345345
SWIFT_OBJC_BRIDGING_HEADER = "UnnaturalScrollWheels/UnnaturalScrollWheels-Bridging-Header.h";

UnnaturalScrollWheels/AppDelegate.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate {
130130
Options.shared.origAccel = origAccel
131131
UserDefaults.standard.set(origAccel, forKey: "OriginalAccel")
132132
}
133+
if Options.shared.disableMouseAccel {
134+
Options.shared.accel = -1
135+
} else {
136+
Options.shared.accel = Options.shared.origAccel
137+
}
133138
// Set the mouse acceleration
134139
let accelNum: CFNumber = CFNumberCreate(kCFAllocatorDefault, CFNumberType.sInt32Type, &Options.shared.accel)
135140
IOHIDEventSystemClientSetProperty(client, mouseAccelerationType, accelNum)

UnnaturalScrollWheels/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>$(MARKETING_VERSION)</string>
2121
<key>CFBundleVersion</key>
22-
<string>186</string>
22+
<string>190</string>
2323
<key>LSApplicationCategoryType</key>
2424
<string>public.app-category.utilities</string>
2525
<key>LSMinimumSystemVersion</key>

UnnaturalScrollWheels/PreferencesViewController.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ class PreferencesViewController: NSViewController {
5858

5959
@IBAction func disableMouseAccelClicked(_ sender: Any){
6060
Options.shared.disableMouseAccel = !Options.shared.disableMouseAccel
61-
if Options.shared.disableMouseAccel {
62-
Options.shared.accel = -1
63-
} else {
64-
Options.shared.accel = Options.shared.origAccel
65-
}
6661
appDelegate?.disableMouseAccel()
6762
}
6863

0 commit comments

Comments
 (0)