[Scummvm-devel] Cloud Support

Thierry Crozat criezy at scummvm.org
Mon Sep 5 23:18:32 CEST 2016


Thanks for directing me into the right direction. It turns out a couple of functions were not implemented in the OpenGLGraphicsManager. As a result it was working when using a SDL graphic mode (e.g. "X2") but not when using OpenGL. I also changed the code to only get a warning instead of erroring out when that happens. The cloud icon doesn't seem so important to me that we need to close ScummVM when we cannot display it ;)

Thierry

On 05 Sep 2016, at 02:13, Alexander Tkachev <alexander at tkachov.ru> wrote:

> We're loading an icon from data array into TransparentSurface (CloudIcon::loadIcon() @ cloudicon.cpp:115). When it's loaded, it's being converted to OSD surface format, because that's where it's going to be drawn on. This error means OSD format is neither 16bpp nor 32bpp.
> 
> The icon is png with alpha, so it's 32bpp. OSD, IIRC, had 24bpp. Now it should be 32bpp too. I guess that's yet another backend I haven't changed OSD code on.
>  
> — Alexander
>  
>  
>  
> 05.09.2016, 05:30, "Thierry Crozat" <criezy at scummvm.org>:
>> I have activated my test app on Dropbox but when I connect ScummVM to DropBox I get a crash that seems related to the cloud icon.
>> This is on OS X with the latest code (git ed92175b)
>>  
>> In the console I get the following error:
>> Surface::convertTo(): Can only convert to 28pp and 48pp!
>>  
>> The relevant part of the call stack is:
>> 12  scummvm                        0x0000000101d97ebe OSystem_SDL::fatalError() + 46 (sdl.cpp:369)
>> 13  scummvm                        0x0000000103f348f1 error(char const*, ...) + 673 (textconsole.cpp:103)
>> 14  scummvm                        0x0000000103de0f9a Graphics::TransparentSurface::convertTo(Graphics::PixelFormat const&, unsigned char const*) const + 330 (transparent_surface.cpp:999)
>> 15  scummvm                        0x0000000103d2f0f8 Networking::CloudIcon::loadIcon(Graphics::TransparentSurface&, unsigned char*, unsigned int) + 312 (cloudicon.cpp:125)
>> 16  scummvm                        0x0000000103d2e9e5 Networking::CloudIcon::initIcons() + 69 (cloudicon.cpp:110)
>> 17  scummvm                        0x0000000103d2e993 Networking::CloudIcon::CloudIcon() + 115 (cloudicon.cpp:40)
>> 18  scummvm                        0x0000000103d2ea35 Networking::CloudIcon::CloudIcon() + 21 (cloudicon.cpp:40)
>> 19  scummvm                        0x0000000103d2b1f3 Networking::ConnectionManager::ConnectionManager() + 147 (connectionmanager.cpp:40)
>> 20  scummvm                        0x0000000103d2b245 Networking::ConnectionManager::ConnectionManager() + 21 (connectionmanager.cpp:43)
>> 21  scummvm                        0x0000000103d2c063 Common::Singleton<Networking::ConnectionManager>::makeInstance() + 35 (singleton.h:52)
>> 22  scummvm                        0x0000000103d2bf2a Common::Singleton<Networking::ConnectionManager>::instance() + 26 (singleton.h:71)
>> 23  scummvm                        0x0000000103cf3d3b Cloud::Storage::addRequest(Networking::Request*) + 107 (storage.cpp:55)
>> 24  scummvm                        0x0000000103d065a5 Cloud::Dropbox::DropboxStorage::getAccessToken(Common::String) + 1141 (dropboxstorage.cpp:91)
>> 25  scummvm                        0x0000000103d060fd Cloud::Dropbox::DropboxStorage::DropboxStorage(Common::String) + 125 (dropboxstorage.cpp:71)
>> 26  scummvm                        0x0000000103d065e5 Cloud::Dropbox::DropboxStorage::DropboxStorage(Common::String) + 21 (dropboxstorage.cpp:72)
>> 27  scummvm                        0x0000000103cf0edd Cloud::CloudManager::connectStorage(unsigned int, Common::String) + 269 (cloudmanager.cpp:255)
>> 28  scummvm                        0x0000000103cd4ff1 GUI::StorageWizardDialog::handleCommand(GUI::CommandSender*, unsigned int, unsigned int) + 3073 (storagewizarddialog.cpp:258)
>> 29  scummvm                        0x0000000103d39c4b GUI::CommandSender::sendCommand(unsigned int, unsigned int) + 107 (object.h:56)
>> 30  scummvm                        0x0000000103d39ab1 Networking::IndexPageHandler::handle(Networking::Client&) + 385 (indexpagehandler.cpp:58)
>> 31  scummvm                        0x0000000103d40229 Networking::LocalWebserver::handleClient(unsigned int) + 649 (localwebserver.cpp:230)
>> 32  scummvm                        0x0000000103d3f2b8 Networking::LocalWebserver::handle() + 152 (localwebserver.cpp:186)
>> 33  scummvm                        0x0000000103d3f219 Networking::localWebserverTimer(void*) + 25 (localwebserver.cpp:69)
>>  
>> Any idea what is wrong?
>>  
>> Thierry
>>  
>> On 01 Sep 2016, at 17:58, Alexander Tkachev <alexander at tkachov.ru> wrote:
>>  
>>> 
>>> Hi everyone,
>>>  
>>> Eugene asked me to write a short note for porters. We've merged my PR recently, which adds two features in ScummVM: Cloud support and local webserver.
>>>  
>>> The first one needs libcurl, which is detected using curl-config in configure. If it is found, USE_LIBCURL is defined and backends/cloud files are used.
>>>  
>>> The second one needs SDL_net and USE_SDL_NET is defined if it's found. Local webserver could be found within backends/networking/sdl_net.
>>>  
>>> There are some interactive tests in testbed, mostly for Cloud.
>>>  
>>> There are also some minor additional features, which make user experience a bit better. Those are URL opening and Connection::isLimited() function. Cloud works fine without these, but you can implement these if you want and it's available for the platform. There is an interactive test for urlOpen() in testbed too.
>>>  
>>> Finally, I've updated OSD to show Cloud sync icon. But I didn't update it in some backends, and thus buildbot fails to build these. I might have time to fix these soon, but I won't be able to test whether it works as it should.
>>>  
>>> Also, as we haven't set up official ScummVM Cloud apps yet, you'd have to register your own test apps in order to test how Cloud API works. App's KEY/SECRET should be added to the [cloud] section of your scummvm.ini file:
>>> DROPBOX_KEY=...
>>> DROPBOX_SECRET=...
>>> ONEDRIVE_KEY=...
>>> ONEDRIVE_SECRET=...
>>> GOOGLE_DRIVE_KEY=...
>>> GOOGLE_DRIVE_SECRET=...
>>> BOX_KEY=...
>>> BOX_SECRET=...
>>>  
>>> As Cloud feature works with these providers similarly, you don't have to register all four apps. I'd recommend Dropbox, as it's really simple to create an app there. Short links to scummvm.org are redirecting to my app, so instead of typing those you'd have to make a link on your own. For example, this link template could be used for Dropbox app:
>>> https://www.dropbox.com/1/oauth2/authorize?response_type=code&redirect_uri=https://www.scummvm.org/c/code&client_id=<DROPBOX_KEY>
>>>  
>>> That link redirects to https://www.scummvm.org/c/code. If you want to test auth using local webserver, you should put http://localhost:12345/ in redirect_uri instead.
>>>  
>>> These redirect_uris should be allowed in application settings on developer's page.
>>>  
>>> — Alexander
>>>  
>>> _______________________________________________
>>> Scummvm-devel mailing list
>>> Scummvm-devel at lists.scummvm.org
>>> http://lists.scummvm.org/listinfo/scummvm-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20160905/5b4e5c80/attachment-0001.html>


More information about the Scummvm-devel mailing list