aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/options.cpp4
-rw-r--r--gui/storagewizarddialog.cpp7
-rw-r--r--gui/storagewizarddialog.h2
3 files changed, 12 insertions, 1 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index 0fe4e9f8f4..1e9a8c2890 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1319,7 +1319,11 @@ GlobalOptionsDialog::GlobalOptionsDialog(LauncherDialog *launcher)
_runServerButton = new ButtonWidget(container, "GlobalOptions_Cloud_Container.RunServerButton", _("Run server"), _("Run local webserver"), kRunServerCmd);
_serverInfoLabel = new StaticTextWidget(container, "GlobalOptions_Cloud_Container.ServerInfoLabel", _("Not running"));
+#ifdef USE_SDL_NET
uint32 port = Networking::LocalWebserver::getPort();
+#else
+ uint32 port = 0; // the following widgets are hidden anyway
+#endif
_serverPortDesc = new StaticTextWidget(container, "GlobalOptions_Cloud_Container.ServerPortDesc", _("Server's port:"), _("Which port is used by server\nAuth with server is not available with non-default port"));
_serverPort = new EditTextWidget(container, "GlobalOptions_Cloud_Container.ServerPortEditText", Common::String::format("%u", port), 0);
_serverPortClearButton = addClearButton(container, "GlobalOptions_Cloud_Container.ServerPortClearButton", kServerPortClearCmd);
diff --git a/gui/storagewizarddialog.cpp b/gui/storagewizarddialog.cpp
index d4ad3e32df..9e522fb2de 100644
--- a/gui/storagewizarddialog.cpp
+++ b/gui/storagewizarddialog.cpp
@@ -41,7 +41,10 @@ enum {
};
StorageWizardDialog::StorageWizardDialog(uint32 storageId):
- Dialog("GlobalOptions_Cloud_ConnectionWizard"), _storageId(storageId), _close(false), _stopServerOnClose(false) {
+ Dialog("GlobalOptions_Cloud_ConnectionWizard"), _storageId(storageId), _close(false) {
+#ifdef USE_SDL_NET
+ _stopServerOnClose = false;
+#endif
_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
Common::String headline = Common::String::format(_("%s Storage Connection Wizard"), CloudMan.listStorages()[_storageId].c_str());
@@ -195,10 +198,12 @@ void StorageWizardDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
close();
break;
}
+#ifdef USE_SDL_NET
case kStorageCodePassedCmd:
CloudMan.connectStorage(_storageId, LocalServer.indexPageHandler().code());
_close = true;
break;
+#endif
default:
Dialog::handleCommand(sender, cmd, data);
}
diff --git a/gui/storagewizarddialog.h b/gui/storagewizarddialog.h
index 6b00d60915..cc70f86278 100644
--- a/gui/storagewizarddialog.h
+++ b/gui/storagewizarddialog.h
@@ -46,7 +46,9 @@ class StorageWizardDialog : public Dialog {
StaticTextWidget *_messageWidget;
ButtonWidget *_connectWidget;
bool _close;
+#ifdef USE_SDL_NET
bool _stopServerOnClose;
+#endif
/** Return short scummvm.org URL for user to navigate to. */
Common::String getUrl() const;