diff options
-rw-r--r-- | gssc.mm | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -74,6 +74,12 @@ void OnGSCapabilityChanged( int main(int argc, char *argv[]) { dlopen("/System/Library/Frameworks/Foundation.framework/Foundation", RTLD_GLOBAL | RTLD_LAZY); dlopen("/System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices", RTLD_GLOBAL | RTLD_LAZY); + if (getenv("OS_ACTIVITY_DT_MODE")) { + // This would make a bunch of random NSLogs print + unsetenv("OS_ACTIVITY_DT_MODE"); + execvp(argv[0], argv); + exit(1); + } NSAutoreleasePool *pool = [[objc_getClass("NSAutoreleasePool") alloc] init]; @@ -723,7 +729,11 @@ int main(int argc, char *argv[]) { } if (capability != nil) { - printf("%s\n", capability == nil ? "(null)" : [[capability description] UTF8String]); + if ([capability isKindOfClass:[NSString class]]) { + printf("%s\n", [(NSString*)capability UTF8String]); + } else { + printf("%s\n", capability == nil ? "(null)" : [[capability description] UTF8String]); + } break; } |