Speed up tests.

NSTask doesn't wait
This commit is contained in:
Taylor Holliday 2023-04-15 16:54:32 -07:00
parent 86e1563334
commit aa33f717c3
1 changed files with 5 additions and 1 deletions

View File

@ -84,7 +84,11 @@ void showTexture(id<MTLTexture> texture, NSString* name) {
CGImageRef image = createImage(texture);
writeCGImage(image, (__bridge CFURLRef)tmpURL);
#if TARGET_OS_OSX
system([NSString stringWithFormat:@"open %@", tmpURL.path].UTF8String);
// system([NSString stringWithFormat:@"open %@", tmpURL.path].UTF8String);
auto task = [[NSTask alloc] init];
task.launchPath = @"/usr/bin/open";
task.arguments = @[tmpURL.path];
[task launch];
#endif
CGImageRelease(image);