Mercurial > minori
diff src/sys/osx/filesystem.mm @ 5:51ae25154b70
Fix OS X support code
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sat, 12 Aug 2023 13:10:34 -0400 |
parents | |
children | 5c0397762b53 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/sys/osx/filesystem.mm Sat Aug 12 13:10:34 2023 -0400 @@ -0,0 +1,11 @@ +#include <Cocoa/Cocoa.h> +#include <string> + +namespace osx { + +std::string GetApplicationSupportDirectory() { + NSArray* strings = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, true); + return std::string([[strings objectAtIndex:0] UTF8String]); +} + +} \ No newline at end of file