scummvm/backends/platform/sdl/morphos/morphos.cpp
BeWorld 81fe49242a MORPHOS: Add OpenURL support
- add OpenURL support
- setupIcon doesnt working with SDL2 MorphOS
2020-09-07 19:10:05 +01:00

54 lines
1.6 KiB
C++

/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "common/scummsys.h"
#ifdef __MORPHOS__
#include "backends/platform/sdl/morphos/morphos.h"
#include "backends/fs/morphos/morphos-fs-factory.h"
#include <proto/exec.h>
#include <proto/openurl.h>
void OSystem_MorphOS::init() {
// Initialze File System Factory
_fsFactory = new MorphOSFilesystemFactory();
// Invoke parent implementation of this method
OSystem_SDL::init();
}
bool OSystem_MorphOS::openUrl(const Common::String &url) {
struct Library *OpenURLBase = OpenLibrary("openurl.library",0);
static struct TagItem URLTags[] = {{TAG_DONE, (ULONG) NULL}};
if (OpenURLBase){
URL_OpenA((STRPTR)url.c_str(), (struct TagItem*) URLTags);
CloseLibrary(OpenURLBase);
return true;
}
return false;
}
#endif