Skip to content

Commit

Permalink
macOS: Fix int.from_bytes, int.to_bytes for show.py
Browse files Browse the repository at this point in the history
Related #2729
  • Loading branch information
MattHag committed Jan 1, 2025
1 parent 8299005 commit a5c45e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/solaar/cli/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ def _print_device(dev, num=None):
if isinstance(feature, str):
feature_bytes = bytes.fromhex(feature[-4:])
else:
feature_bytes = feature.to_bytes(2)
feature_int = int.from_bytes(feature_bytes)
feature_bytes = feature.to_bytes(2, byteorder="little")
feature_int = int.from_bytes(feature_bytes, byteorder="little")
flags = dev.request(0x0000, feature_bytes)
flags = 0 if flags is None else ord(flags[1:2])
flags = common.flag_names(hidpp20_constants.FeatureFlag, flags)
Expand Down

0 comments on commit a5c45e3

Please sign in to comment.