diff options
Diffstat (limited to 'backends/platform/sdl/macosx')
| -rw-r--r-- | backends/platform/sdl/macosx/macosx.cpp | 9 | ||||
| -rw-r--r-- | backends/platform/sdl/macosx/macosx.h | 2 | 
2 files changed, 10 insertions, 1 deletions
| diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp index c4e83dc9d3..212af6723e 100644 --- a/backends/platform/sdl/macosx/macosx.cpp +++ b/backends/platform/sdl/macosx/macosx.cpp @@ -107,7 +107,7 @@ void OSystem_MacOSX::addSysArchivesToSearchSet(Common::SearchSet &s, int priorit  }  bool OSystem_MacOSX::hasFeature(Feature f) { -	if (f == kFeatureDisplayLogFile || f == kFeatureClipboardSupport) +	if (f == kFeatureDisplayLogFile || f == kFeatureClipboardSupport || f == kFeatureOpenUrl)  		return true;  	return OSystem_POSIX::hasFeature(f);  } @@ -133,6 +133,13 @@ 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()); diff --git a/backends/platform/sdl/macosx/macosx.h b/backends/platform/sdl/macosx/macosx.h index 0c755cbf6d..929f2f91fa 100644 --- a/backends/platform/sdl/macosx/macosx.h +++ b/backends/platform/sdl/macosx/macosx.h @@ -35,6 +35,8 @@ public:  	virtual bool hasTextInClipboard();  	virtual Common::String getTextFromClipboard(); +	 +	virtual bool openUrl(const Common::String &url);  	virtual Common::String getSystemLanguage() const; | 
