From 0e6e712028dcaf451d21b1434cf2d02ed20e5a7a Mon Sep 17 00:00:00 2001 From: MattHag <16444067+MattHag@users.noreply.github.com> Date: Wed, 1 Jan 2025 16:38:42 +0100 Subject: [PATCH] macOS: Fix int.from_bytes, int.to_bytes for show.py Related #2729 --- lib/solaar/cli/show.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/solaar/cli/show.py b/lib/solaar/cli/show.py index e26a617fd..78a14ede8 100644 --- a/lib/solaar/cli/show.py +++ b/lib/solaar/cli/show.py @@ -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, byteorder="big") - feature_int = int.from_bytes(feature_bytes, byteorder="big") + 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)