Sha256: a89fa4cf30fa0f93e9af256560e9bafab5860c596e02f2af655430824eabd057
Contents?: true
Size: 1.1 KB
Versions: 27
Compression:
Stored size: 1.1 KB
Contents
#import <Gosu/Directories.hpp> #import "MacUtility.hpp" #import <Gosu/Utility.hpp> #import <Foundation/NSAutoreleasePool.h> #import <Foundation/NSBundle.h> #import <Foundation/NSString.h> #import <Foundation/NSPathUtilities.h> std::wstring Gosu::resourcePrefix() { static std::wstring result; if (result.empty()) { ObjRef<NSAutoreleasePool> pool([[NSAutoreleasePool alloc] init]); NSBundle* bundle = [NSBundle mainBundle]; if (bundle == nil) return L""; NSString* str = [bundle resourcePath]; result = Gosu::widen([str fileSystemRepresentation]) + L"/"; } return result; } std::wstring Gosu::sharedResourcePrefix() { static std::wstring result; if (result.empty()) { ObjRef<NSAutoreleasePool> pool([[NSAutoreleasePool alloc] init]); NSBundle* bundle = [NSBundle mainBundle]; if (bundle == nil) return L""; NSString* str = [bundle bundlePath]; str = [str stringByDeletingLastPathComponent]; result = Gosu::widen([str fileSystemRepresentation]) + L"/"; } return result; }
Version data entries
27 entries across 27 versions & 1 rubygems