diff options
author | jstebbins <[email protected]> | 2015-04-19 14:38:38 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2015-04-19 14:38:38 +0000 |
commit | 76308dc3563db85da5a3daae74014637423cb249 (patch) | |
tree | c53612b2947e5eef6e896cbac8d6cb2340a99b72 /libhb/platform/macosx | |
parent | 2b0b91800b4e3461f0b9c1d8c3070968b1b9fe90 (diff) |
ports: add functions for looking up user config directory
These will be used by the CLI for loading custom user presets.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7105 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/platform/macosx')
-rw-r--r-- | libhb/platform/macosx/config.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libhb/platform/macosx/config.m b/libhb/platform/macosx/config.m new file mode 100644 index 000000000..9fa86aaaf --- /dev/null +++ b/libhb/platform/macosx/config.m @@ -0,0 +1,14 @@ +#import <Foundation/Foundation.h> +/* #import <Cocoa/Cocoa.h> */ + +void osx_get_user_config_directory(char path[512]) +{ + @autoreleasepool { + NSArray *paths = NSSearchPathForDirectoriesInDomains( + NSApplicationSupportDirectory, NSUserDomainMask, YES); + NSString *dir = paths[0]; + strncpy(path, dir.UTF8String, 512); + path[511] = 0; + } +} + |