From e833c8f65c05a1db182d4982d4e1b8edfe014980 Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Wed, 20 Jul 2016 13:20:23 +0600 Subject: CLOUD: Add OSD warning when can't start LocalWebserver --- backends/networking/sdl_net/localwebserver.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'backends') 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 #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 -- cgit v1.2.3