[Scummvm-git-logs] scummvm master -> 442edb6ccc35d9286ba8343cb90beaab457bc35d

criezy criezy at scummvm.org
Wed Apr 26 09:41:52 CEST 2017

This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

442edb6ccc MACOSX: Expand ~ in default screenshot path

Commit: 442edb6ccc35d9286ba8343cb90beaab457bc35d
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2017-04-26T08:39:06+01:00

Commit Message:
MACOSX: Expand ~ in default screenshot path

When using SDL to save the screenshot, using a told results in
an error.

Changed paths:

diff --git a/backends/platform/sdl/macosx/macosx_wrapper.mm b/backends/platform/sdl/macosx/macosx_wrapper.mm
index 5de3eb6..02516e5 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

More information about the Scummvm-git-logs mailing list