Skip to content

Commit e89b0b8

Browse files
committed
Add better backwards compatibility
1 parent 7756b27 commit e89b0b8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

openrgb/plugins/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self, plugin_data: utils.Plugin, comms: NetworkClient):
1717
self.id = plugin_data.id
1818
self.sdk_version = plugin_data.sdk_version
1919
self.comms = comms
20-
assert self.sdk_version == self.version
20+
assert self.sdk_version <= self.version
2121

2222
def __repr__(self):
2323
return type(self).__name__

openrgb/plugins/effects.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ def update(self):
4343
self.comms.read()
4444

4545
def recv(self, pkt_id: EffectPacketType, data: Iterator[int]): # type: ignore
46-
for _ in range(4):
47-
next(data)
46+
if self.sdk_version > 1:
47+
for _ in range(4):
48+
next(data)
4849
if pkt_id == EffectPacketType.REQUEST_EFFECT_LIST:
4950
self.effects = utils.parse_list(Effect, data, self.version)
5051

0 commit comments

Comments
 (0)