diff options
author | Alexander Tkachev | 2016-07-25 13:13:47 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 86f7b75dd7436322f90b6633739b96f92dec16a2 (patch) | |
tree | f6c39b2a56b46a51d5939659b0a4aa8615bd7845 | |
parent | c9b819b577e9e406fd8ac85773c82101b98766c2 (diff) | |
download | scummvm-rg350-86f7b75dd7436322f90b6633739b96f92dec16a2.tar.gz scummvm-rg350-86f7b75dd7436322f90b6633739b96f92dec16a2.tar.bz2 scummvm-rg350-86f7b75dd7436322f90b6633739b96f92dec16a2.zip |
GUI: Fix SDL_Net-related errors
Checked by rebuilding ScummVM without SDL_Net in MinGW.
Also fixes StorageWizardDialog's warning about _stopServerOnClose.
-rw-r--r-- | gui/options.cpp | 4 | ||||
-rw-r--r-- | gui/storagewizarddialog.cpp | 7 | ||||
-rw-r--r-- | gui/storagewizarddialog.h | 2 |
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; |