diff options
author | Thierry Crozat | 2017-04-26 08:38:55 +0100 |
---|---|---|
committer | Thierry Crozat | 2017-04-26 08:39:06 +0100 |
commit | 442edb6ccc35d9286ba8343cb90beaab457bc35d (patch) | |
tree | 6abf049b58e43bc221f0b9add1f235569de1b6af /backends/platform/sdl | |
parent | 519719db497d5f96567ccc8b794922dedf6409dd (diff) | |
download | scummvm-rg350-442edb6ccc35d9286ba8343cb90beaab457bc35d.tar.gz scummvm-rg350-442edb6ccc35d9286ba8343cb90beaab457bc35d.tar.bz2 scummvm-rg350-442edb6ccc35d9286ba8343cb90beaab457bc35d.zip |
MACOSX: Expand ~ in default screenshot path
When using SDL to save the screenshot, using a told results in
an error.
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 +} |