Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typo, corrected header files, etc #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include "i2c_smbus.h"
#include "LogManager.h"
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#include <cstdlib>
#include <thread>
#include <QMessageBox>

Expand Down Expand Up @@ -84,7 +84,7 @@ void WaitWhileServerOnline(NetworkServer* srv)
while (srv->GetOnline())
{
std::this_thread::sleep_for(1s);
};
}
}

/******************************************************************************************\
Expand Down Expand Up @@ -121,8 +121,7 @@ bool AttemptLocalConnection()
client->StopClient();

delete client;

client = NULL;
client = nullptr;
}
else
{
Expand Down Expand Up @@ -170,7 +169,7 @@ void MessageBoxCallback(void*, PLogMessage message)
/*---------------------------------------------------------*\
| Set the informative text from the message information |
\*---------------------------------------------------------*/
QString info = "Occured in ";
QString info = "Occurred in ";
info += message->filename;
info += " on line " + QVariant(message->line).toString();
box.setInformativeText(info);
Expand Down Expand Up @@ -235,16 +234,15 @@ int main(int argc, char* argv[])
\*---------------------------------------------------------*/
if(!(ret_flags & RET_FLAG_NO_AUTO_CONNECT))
{
printf("Attempting to connect to local OpenRGB server.\r\n");
std::printf("Attempting to connect to local OpenRGB server.\r\n");

if(!AttemptLocalConnection())
{
printf("Local OpenRGB server unavailable.\r\n");
std::printf("Local OpenRGB server unavailable.\r\n");
}
else
{
printf("Local OpenRGB server connected, running in client mode\r\n");

std::printf("Local OpenRGB server connected, running in client mode\r\n");
ResourceManager::get()->DisableDetection();
}
}
Expand All @@ -256,7 +254,7 @@ int main(int argc, char* argv[])
{
if(ResourceManager::get()->GetDetectionEnabled())
{
printf("Running standalone.\r\n");
std::printf("Running standalone.\r\n");
}

ResourceManager::get()->DetectDevices();
Expand All @@ -272,7 +270,7 @@ int main(int argc, char* argv[])

if(!ResourceManager::get()->GetServer()->GetOnline())
{
printf("Server failed to start\r\n");
std::printf("Server failed to start\r\n");
}
}

Expand Down