mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-06-29 11:51:07 -04:00
Remove REMOTE_CONTROL flags while building (#6732)
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
// MARK: - Public
|
||||
|
||||
void Network::Enable(const char* host, uint16_t port) {
|
||||
#ifdef ENABLE_REMOTE_CONTROL
|
||||
if (isEnabled) {
|
||||
return;
|
||||
}
|
||||
@@ -22,7 +21,6 @@ void Network::Enable(const char* host, uint16_t port) {
|
||||
}
|
||||
|
||||
receiveThread = std::thread(&Network::ReceiveFromServer, this);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Network::Disable() {
|
||||
@@ -50,10 +48,8 @@ void Network::ProcessOutgoingPackets() {
|
||||
}
|
||||
|
||||
void Network::SendDataToRemote(const char* payload) {
|
||||
#ifdef ENABLE_REMOTE_CONTROL
|
||||
SPDLOG_DEBUG("[Network] Sending data: {}", payload);
|
||||
SDLNet_TCP_Send(networkSocket, payload, strlen(payload) + 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Network::SendJsonToRemote(nlohmann::json payload) {
|
||||
@@ -63,7 +59,6 @@ void Network::SendJsonToRemote(nlohmann::json payload) {
|
||||
// MARK: - Private
|
||||
|
||||
void Network::ReceiveFromServer() {
|
||||
#ifdef ENABLE_REMOTE_CONTROL
|
||||
while (isEnabled) {
|
||||
while (!isConnected && isEnabled) {
|
||||
SPDLOG_TRACE("[Network] Attempting to make connection to server...");
|
||||
@@ -140,7 +135,6 @@ void Network::ReceiveFromServer() {
|
||||
SPDLOG_INFO("[Network] Ending receiving thread...");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Network::HandleRemoteData(char payload[512]) {
|
||||
|
||||
Reference in New Issue
Block a user