aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorAlexander Tkachev2016-07-20 13:20:23 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commite833c8f65c05a1db182d4982d4e1b8edfe014980 (patch)
treee54d253b312d226aee77a96a62e467227c2fef4c /backends
parent63311bac267ed0ebacc10068d8ffd2354a5f4371 (diff)
downloadscummvm-rg350-e833c8f65c05a1db182d4982d4e1b8edfe014980.tar.gz
scummvm-rg350-e833c8f65c05a1db182d4982d4e1b8edfe014980.tar.bz2
scummvm-rg350-e833c8f65c05a1db182d4982d4e1b8edfe014980.zip
CLOUD: Add OSD warning when can't start LocalWebserver
Diffstat (limited to 'backends')
-rw-r--r--backends/networking/sdl_net/localwebserver.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/backends/networking/sdl_net/localwebserver.cpp b/backends/networking/sdl_net/localwebserver.cpp
index 29db0b71ff..1480418b70 100644
--- a/backends/networking/sdl_net/localwebserver.cpp
+++ b/backends/networking/sdl_net/localwebserver.cpp
@@ -28,6 +28,7 @@
#include "common/str.h"
#include "common/system.h"
#include "common/timer.h"
+#include "common/translation.h"
#include <SDL/SDL_net.h>
#ifdef POSIX
@@ -100,7 +101,11 @@ void LocalWebserver::start() {
_serverSocket = SDLNet_TCP_Open(&ip);
if (!_serverSocket) {
- error("SDLNet_TCP_Open: %s\n", SDLNet_GetError());
+ warning("SDLNet_TCP_Open: %s", SDLNet_GetError());
+ stopTimer();
+ g_system->displayMessageOnOSD(_("Failed to start local webserver.\nCheck whether selected port is not used by another application and try again."));
+ _handleMutex.unlock();
+ return;
}
// Create a socket set