diff options
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r-- | backends/platform/sdl/macosx/macosx_wrapper.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/platform/sdl/macosx/macosx_wrapper.mm b/backends/platform/sdl/macosx/macosx_wrapper.mm index 5de3eb6bac..02516e5ffe 100644 --- a/backends/platform/sdl/macosx/macosx_wrapper.mm +++ b/backends/platform/sdl/macosx/macosx_wrapper.mm @@ -54,11 +54,11 @@ Common::String getDesktopPathMacOSX() { // NSUrl *url = [[[NSFileManager defaultManager] URLsForDirectory:NSDesktopDirectory inDomains:NSUserDomainMask] firstObject]; // However it is only available in OS X 10.6+. So use NSSearchPathForDirectoriesInDomains instead (available since OS X 10.0) // [NSArray firstObject] is also only available in OS X 10.6+. So we need to use [NSArray count] and [NSArray objectAtIndex:] - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, NSUserDomainMask, NO); + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, NSUserDomainMask, YES); if ([paths count] == 0) return Common::String(); NSString *path = [paths objectAtIndex:0]; if (path == nil) return Common::String(); return Common::String([path cStringUsingEncoding:NSASCIIStringEncoding]); -}
\ No newline at end of file +} |