Skip to content

Commit 37e890e

Browse files
committed
Now the remote support is only enabled if remotehost is set in the config
1 parent b87a2b8 commit 37e890e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ int main(int ac, char *ag[])
228228
QDir().mkdir(SQPath::logDirectoryPath());
229229
//std::filebuf crashFile;
230230
mySettings = new Settings();
231-
mySettings->setValue<Settings::RemoteHost>("192.168.0.27");
231+
//mySettings->setValue<Settings::RemoteHost>("192.168.0.37");
232232
#ifndef Q_OS_WIN
233233
globalSettings = new QSettings("nyo.fr", "QUsb2Snes");
234234
#else

ui/appui.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,13 @@ Q_LOGGING_CATEGORY(log_appUi, "APPUI")
4848
#include "appui.h"
4949
#include "wsserver.h"
5050
#include "sqpath.h"
51+
#include "settings.hpp"
5152

5253

5354
static const QString applicationJsonFileName = "qusb2snesapp.json";
5455
extern QSettings* globalSettings;
5556
extern WSServer wsServer;
57+
extern Settings* mySettings;
5658

5759

5860
AppUi::AppUi(QObject *parent) : QObject(parent)
@@ -154,7 +156,10 @@ void AppUi::init()
154156
wsServer.addTrusted(ori);
155157
}
156158
}
157-
addRemoteFactory();
159+
if (mySettings->value<Settings::RemoteHost>().isEmpty() == false)
160+
{
161+
addRemoteFactory();
162+
}
158163
checkForApplications();
159164
connect(qApp, &QCoreApplication::aboutToQuit, this, [=]() {
160165
sysTray->hide();

0 commit comments

Comments
 (0)