[Scummvm-git-logs] scummvm master -> b9d234e98673732c7a2625dd8604298b8c4929e0

criezy noreply at scummvm.org
Sat Mar 5 19:30:13 UTC 2022


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

Summary:
b9d234e986 MACOSX: Improve conversion of path from NSString to C string


Commit: b9d234e98673732c7a2625dd8604298b8c4929e0
    https://github.com/scummvm/scummvm/commit/b9d234e98673732c7a2625dd8604298b8c4929e0
Author: C.W. Betts (computers57 at hotmail.com)
Date: 2022-03-05T19:28:10Z

Commit Message:
MACOSX: Improve conversion of path from NSString to C string

Use `-[NSString fileSystemRepresentation]` if you are going to pass
a path to a lower-level function, like `fopen()`.

Changed paths:
    backends/platform/sdl/macosx/macosx_wrapper.mm


diff --git a/backends/platform/sdl/macosx/macosx_wrapper.mm b/backends/platform/sdl/macosx/macosx_wrapper.mm
index 95580b5f6ea..f79c6c9909b 100644
--- a/backends/platform/sdl/macosx/macosx_wrapper.mm
+++ b/backends/platform/sdl/macosx/macosx_wrapper.mm
@@ -108,5 +108,5 @@ Common::String getDesktopPathMacOSX() {
 	NSString *path = [paths objectAtIndex:0];
 	if (path == nil)
 		return Common::String();
-	return Common::String([path cStringUsingEncoding:NSASCIIStringEncoding]);
+	return Common::String([path fileSystemRepresentation]);
 }




More information about the Scummvm-git-logs mailing list