yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
file_path.mm
Go to the documentation of this file.
1#include "file_path.h"
2
3#include <iostream>
4#include <string>
5
6#if defined(__APPLE__) && defined(__MACH__)
7#include <Foundation/Foundation.h>
8#include <TargetConditionals.h>
9
10#if TARGET_IPHONE_SIMULATOR == 1 || TARGET_OS_IPHONE == 1
12 NSBundle* bundle = [NSBundle mainBundle];
13 NSString* resourceDirectoryPath = [bundle bundlePath];
14 NSString* path = [resourceDirectoryPath stringByAppendingString:@"/"];
15 return [path UTF8String];
16}
17#elif TARGET_OS_MAC == 1
19 NSBundle* bundle = [NSBundle mainBundle];
20 NSString* resourceDirectoryPath = [bundle bundlePath];
21 NSString* path = [resourceDirectoryPath stringByAppendingString:@"/"];
22 return [path UTF8String];
23}
24
25#endif
26#endif
std::string GetBundleResourcePath()
GetBundleResourcePath returns the path to the bundle resource directory. Specific to MacOS.