Skip to content

Commit

Permalink
chore: lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazer committed Jul 14, 2024
1 parent 6651bc7 commit c24e808
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/platform/macos/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ const KeyCodeMap kKeyCodesMap[] = {
request_accessibility_permission();

Check warning on line 267 in src/platform/macos/input.cpp

View check run for this annotation

Codecov / codecov/patch

src/platform/macos/input.cpp#L266-L267

Added lines #L266 - L267 were not covered by tests
}
BOOST_LOG(info) << "Received " << (is_keyboard_event ? "keyboard" : "mouse") << " event but "
<< default_accessibility_log_msg();
<< default_accessibility_log_msg();
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/platform/macos/misc.mm
Original file line number Diff line number Diff line change
Expand Up @@ -528,17 +528,17 @@ operator bool() override {

bool
request_accessibility_permission() {
NSDictionary* options = @{static_cast<id> (kAXTrustedCheckOptionPrompt): @YES};
return !AXIsProcessTrustedWithOptions(static_cast<CFDictionaryRef> (options));
NSDictionary* options = @{static_cast<id>(kAXTrustedCheckOptionPrompt): @YES};
return !AXIsProcessTrustedWithOptions(static_cast<CFDictionaryRef>(options));
}

bool
has_accessibility_permission() {
NSDictionary* options = @{static_cast<id> (kAXTrustedCheckOptionPrompt): @NO};
NSDictionary* options = @{static_cast<id>(kAXTrustedCheckOptionPrompt): @NO};

Check warning on line 537 in src/platform/macos/misc.mm

View check run for this annotation

Codecov / codecov/patch

src/platform/macos/misc.mm#L536-L537

Added lines #L536 - L537 were not covered by tests
// We use kAXTrustedCheckOptionPrompt == NO here,
// instead of using XIsProcessTrusted(),
// because this will update the accessibility list with sunshine current path
return AXIsProcessTrustedWithOptions(static_cast<CFDictionaryRef> (options));
return AXIsProcessTrustedWithOptions(static_cast<CFDictionaryRef>(options));

Check warning on line 541 in src/platform/macos/misc.mm

View check run for this annotation

Codecov / codecov/patch

src/platform/macos/misc.mm#L541

Added line #L541 was not covered by tests
}

} // namespace platf
Expand Down

0 comments on commit c24e808

Please sign in to comment.