Make default SDK port a defined constant

This commit is contained in:
Adam Honse 2020-06-22 11:32:32 -05:00
parent 12226804f3
commit 0464fbcbe2
3 changed files with 8 additions and 2 deletions

View file

@ -37,7 +37,7 @@ static void Sleep(unsigned int milliseconds)
NetworkClient::NetworkClient(std::vector<RGBController *>& control) : controllers(control)
{
strcpy(port_ip, "127.0.0.1");
port_num = 6742;
port_num = OPENRGB_SDK_PORT;
server_connected = false;
server_controller_count = 0;
}

View file

@ -8,6 +8,12 @@
#pragma once
/*-----------------------------------------*\
| Default OpenRGB SDK port is 6742 |
| This is "ORGB" on a phone keypad |
\*-----------------------------------------*/
#define OPENRGB_SDK_PORT 6742
typedef struct NetPacketHeader
{
char pkt_magic[4]; /* Magic value "ORGB" identifies beginning of packet */

View file

@ -37,7 +37,7 @@ static void Sleep(unsigned int milliseconds)
NetworkServer::NetworkServer(std::vector<RGBController *>& control) : controllers(control)
{
port_num = 6742;
port_num = OPENRGB_SDK_PORT;
server_online = false;
}