From 6869d2f0ba69e75956d531f138ab184635e663d5 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sat, 29 Apr 2006 08:36:43 +0000 Subject: [PATCH] Implement GoToURL(). --- stepmania/src/arch/ArchHooks/ArchHooks_darwin.cpp | 10 ++++++++++ stepmania/src/arch/ArchHooks/ArchHooks_darwin.h | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/stepmania/src/arch/ArchHooks/ArchHooks_darwin.cpp b/stepmania/src/arch/ArchHooks/ArchHooks_darwin.cpp index 4c8a54e30f..8120078445 100644 --- a/stepmania/src/arch/ArchHooks/ArchHooks_darwin.cpp +++ b/stepmania/src/arch/ArchHooks/ArchHooks_darwin.cpp @@ -287,6 +287,16 @@ void ArchHooks_darwin::ExitTimeCriticalSection() #endif } +bool ArchHooks_darwin::GoToURL( RString sUrl ) +{ + CFURLRef url = CFURLCreateWithBytes( kCFAllocatorDefault, (const UInt8*)sUrl.data(), + sUrl.length(), kCFStringEncodingUTF8, NULL ); + OSStatus result = LSOpenCFURLRef( url, NULL ); + + CFRelease( url ); + return result == 0; +} + int64_t ArchHooks::GetMicrosecondsSinceStart( bool bAccurate ) { // http://developer.apple.com/qa/qa2004/qa1398.html diff --git a/stepmania/src/arch/ArchHooks/ArchHooks_darwin.h b/stepmania/src/arch/ArchHooks/ArchHooks_darwin.h index 5d42e65ae5..996a530a18 100644 --- a/stepmania/src/arch/ArchHooks/ArchHooks_darwin.h +++ b/stepmania/src/arch/ArchHooks/ArchHooks_darwin.h @@ -9,11 +9,12 @@ class ArchHooks_darwin : public ArchHooks public: ArchHooks_darwin(); ~ArchHooks_darwin(); - RString GetArchName() { return "OSX"; } + RString GetArchName() { return "OS X"; } void DumpDebugInfo(); RString GetPreferredLanguage(); void EnterTimeCriticalSection(); void ExitTimeCriticalSection(); + bool GoToURL( RString sUrl ); protected: RageMutex *TimeCritMutex;