diff options
Diffstat (limited to 'backends/platform/sdl/macosx/macosx.cpp')
-rw-r--r-- | backends/platform/sdl/macosx/macosx.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp index 7652c0d833..212af6723e 100644 --- a/backends/platform/sdl/macosx/macosx.cpp +++ b/backends/platform/sdl/macosx/macosx.cpp @@ -33,6 +33,7 @@ #include "backends/platform/sdl/macosx/macosx.h" #include "backends/updates/macosx/macosx-updates.h" #include "backends/taskbar/macosx/macosx-taskbar.h" +#include "backends/platform/sdl/macosx/macosx_wrapper.h" #include "common/archive.h" #include "common/config-manager.h" @@ -106,7 +107,7 @@ void OSystem_MacOSX::addSysArchivesToSearchSet(Common::SearchSet &s, int priorit } bool OSystem_MacOSX::hasFeature(Feature f) { - if (f == kFeatureDisplayLogFile) + if (f == kFeatureDisplayLogFile || f == kFeatureClipboardSupport || f == kFeatureOpenUrl) return true; return OSystem_POSIX::hasFeature(f); } @@ -124,6 +125,21 @@ bool OSystem_MacOSX::displayLogFile() { return err != noErr; } +bool OSystem_MacOSX::hasTextInClipboard() { + return hasTextInClipboardMacOSX(); +} + +Common::String OSystem_MacOSX::getTextFromClipboard() { + return getTextFromClipboardMacOSX(); +} + +bool OSystem_MacOSX::openUrl(const Common::String &url) { + CFURLRef urlRef = CFURLCreateWithBytes (NULL, (UInt8*)url.c_str(), url.size(), kCFStringEncodingASCII, NULL); + OSStatus err = LSOpenCFURLRef(urlRef, NULL); + CFRelease(urlRef); + return err != noErr; +} + Common::String OSystem_MacOSX::getSystemLanguage() const { #if defined(USE_DETECTLANG) && defined(USE_TRANSLATION) CFArrayRef availableLocalizations = CFBundleCopyBundleLocalizations(CFBundleGetMainBundle()); |