Skip to content

Commit 0793deb

Browse files
committed
Fix Protocol version
1 parent a9d06a7 commit 0793deb

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/OpenRGB.NET.Example/Program.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020

2121
Console.WriteLine("Starting animation");
2222
var cts = new CancellationTokenSource();
23+
24+
const int fps = 60;
25+
2326
var updateTask = Task.Run(() =>
2427
{
2528
var deviceColors = new Color[devices.Length][];
@@ -41,7 +44,7 @@
4144
client.UpdateLeds(index, slice);
4245
}
4346

44-
Thread.Sleep(33);
47+
Thread.Sleep(1000 / fps);
4548
}
4649
});
4750

src/OpenRGB.NET/OpenRGBClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ private uint GetServerProtocolVersion()
186186
_socket.ReceiveTimeout = 1000;
187187

188188
Span<byte> packet = stackalloc byte[PacketHeader.Length + PacketFactory.ProtocolVersionLength];
189-
PacketFactory.WriteProtocolVersion(packet, 0, CommonProtocolVersion.Number, CommandId.RequestProtocolVersion);
189+
PacketFactory.WriteProtocolVersion(packet, 0, ClientProtocolVersion.Number, CommandId.RequestProtocolVersion);
190190

191191
try
192192
{

0 commit comments

Comments
 (0)