CLOUD: Fix redirect_uri selection code

Now it's not hardcoded based on USE_SDL_NET, but one or another value is
used depending on currently selected LocalWebserver's port.
This commit is contained in:
Alexander Tkachev 2016-07-21 12:06:00 +06:00
parent 438ba985a4
commit 772d8ee42b
9 changed files with 39 additions and 36 deletions

View file

@ -28,6 +28,9 @@
#include "common/translation.h"
#include "common/config-manager.h"
#include "common/str.h"
#ifdef USE_SDL_NET
#include "backends/networking/sdl_net/localwebserver.h"
#endif
namespace Common {
@ -296,6 +299,14 @@ bool CloudManager::isWorking() const {
return false;
}
bool CloudManager::couldUseLocalServer() {
#ifdef USE_SDL_NET
return Networking::LocalWebserver::getPort() == Networking::LocalWebserver::DEFAULT_SERVER_PORT;
#else
return false;
#endif
}
///// SavesSyncRequest-related /////
bool CloudManager::isSyncing() const {