Skip to content

Commit 9f30d3c

Browse files
committed
fixed profiles with versioning
1 parent d21a46f commit 9f30d3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openrgb/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ def pack(self, version: int = 0) -> bytearray:
497497
data = bytearray()
498498
data += struct.pack("16sI", b'OPENRGB_PROFILE\x00', 1)
499499
for dev in self.controllers:
500-
data += dev.data.pack()
500+
data += dev.data.pack(0)
501501
return data
502502

503503
@classmethod
@@ -514,7 +514,7 @@ def unpack(cls, profile: BinaryIO) -> Profile:
514514
break
515515
size = struct.unpack("I", d)[0]
516516
profile.seek(profile.tell() - struct.calcsize("I"))
517-
new_data = ControllerData.unpack(profile.read(size))
517+
new_data = ControllerData.unpack(profile.read(size), 0)
518518
controllers.append(new_data)
519519
return cls(controllers)
520520

0 commit comments

Comments
 (0)