Skip to content

Commit

Permalink
- Fixing an issue with up and down buttons not working properly under…
Browse files Browse the repository at this point in the history
… macOS 10.13.6:

  macOS 10.13.6 posts kHIDUsage_GD_SystemMenu[Up|Down] alongside kHIDUsage_Csmr_Volume[Increment|Decrement],
  which ends up being interpreted as a double press. To avoid this, these usages are ignored when running under
  10.13.6 and later.
- Updating build settings to no longer target i386 (which produces an error in recent Xcode versions)
- Bumping version number to 1.7
- Removing xcuserdata and extending gitignore
  • Loading branch information
felix-schwarz committed Sep 5, 2018
1 parent 33a32ab commit 603fe0f
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 163 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
.DS_Store

*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

*.moved-aside
*.xccheckout
*.xcscmblueprint

4 changes: 2 additions & 2 deletions Example/HIDRemoteExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
ARCHS = "$(ARCHS_STANDARD)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
Expand All @@ -334,7 +334,7 @@
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
ARCHS = "$(ARCHS_STANDARD)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_MISSING_PARENTHESES = YES;
Expand Down

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions HIDRemote/HIDRemote.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//
// HIDRemote.m
// HIDRemote V1.6 (27th September 2017)
// HIDRemote V1.7 (5th September 2018)
//
// Created by Felix Schwarz on 06.04.07.
// Copyright 2007-2017 IOSPIRIT GmbH. All rights reserved.
// Copyright 2007-2018 IOSPIRIT GmbH. All rights reserved.
//
// The latest version of this class is available at
// http://www.iospirit.com/developers/hidremote/
Expand Down
20 changes: 16 additions & 4 deletions HIDRemote/HIDRemote.m
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//
// HIDRemote.m
// HIDRemote V1.6 (27th September 2017)
// HIDRemote V1.7 (5th September 2018)
//
// Created by Felix Schwarz on 06.04.07.
// Copyright 2007-2017 IOSPIRIT GmbH. All rights reserved.
// Copyright 2007-2018 IOSPIRIT GmbH. All rights reserved.
//
// The latest version of this class is available at
// http://www.iospirit.com/developers/hidremote/
Expand Down Expand Up @@ -1067,11 +1067,23 @@ - (HIDRemoteButtonCode)buttonCodeForUsage:(unsigned int)usage usagePage:(unsigne
break;

case kHIDUsage_GD_SystemMenuUp:
buttonCode = kHIDRemoteButtonCodeUp;
// macOS 10.13.6 posts kHIDUsage_GD_SystemMenuUp alongside kHIDUsage_Csmr_VolumeIncrement,
// which ends up being interpreted as a double press. To avoid this, this usage is ignored
// when running under 10.13.6 and later.
if ([HIDRemote OSXVersion] < 0x10d6)
{
buttonCode = kHIDRemoteButtonCodeUp;
}
break;

case kHIDUsage_GD_SystemMenuDown:
buttonCode = kHIDRemoteButtonCodeDown;
// macOS 10.13.6 posts kHIDUsage_GD_SystemMenuDown alongside kHIDUsage_Csmr_VolumeDecrement,
// which ends up being interpreted as a double press. To avoid this, this usage is ignored
// when running under 10.13.6 and later.
if ([HIDRemote OSXVersion] < 0x10d6)
{
buttonCode = kHIDRemoteButtonCodeDown;
}
break;
}
break;
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2007-2017 IOSPIRIT GmbH (http://www.iospirit.com/)
Copyright (c) 2007-2018 IOSPIRIT GmbH (http://www.iospirit.com/)
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down

0 comments on commit 603fe0f

Please sign in to comment.