diff options
author | Alexander Tkachev | 2016-07-21 12:06:00 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 772d8ee42b820a5c19a8d9a9efb215f17606fb8f (patch) | |
tree | c1bc3232d74fce1bdb12910e35b26c5de1f5d919 /backends/cloud/dropbox | |
parent | 438ba985a4a97a8695a6e6fdda6930694976c07b (diff) | |
download | scummvm-rg350-772d8ee42b820a5c19a8d9a9efb215f17606fb8f.tar.gz scummvm-rg350-772d8ee42b820a5c19a8d9a9efb215f17606fb8f.tar.bz2 scummvm-rg350-772d8ee42b820a5c19a8d9a9efb215f17606fb8f.zip |
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.
Diffstat (limited to 'backends/cloud/dropbox')
-rw-r--r-- | backends/cloud/dropbox/dropboxstorage.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/backends/cloud/dropbox/dropboxstorage.cpp b/backends/cloud/dropbox/dropboxstorage.cpp index 7ef07a5a65..d35e29fb05 100644 --- a/backends/cloud/dropbox/dropboxstorage.cpp +++ b/backends/cloud/dropbox/dropboxstorage.cpp @@ -69,11 +69,11 @@ void DropboxStorage::getAccessToken(Common::String code) { request->addPostField("grant_type=authorization_code"); request->addPostField("client_id=" + Common::String(KEY)); request->addPostField("client_secret=" + Common::String(SECRET)); -#ifdef USE_SDL_NET - request->addPostField("&redirect_uri=http%3A%2F%2Flocalhost%3A12345%2F"); -#else - request->addPostField("&redirect_uri=https%3A%2F%2Fwww.scummvm.org/c/code"); -#endif + if (Cloud::CloudManager::couldUseLocalServer()) { + request->addPostField("&redirect_uri=http%3A%2F%2Flocalhost%3A12345%2F"); + } else { + request->addPostField("&redirect_uri=https%3A%2F%2Fwww.scummvm.org/c/code"); + } addRequest(request); } |