OSX: associate abr file, fix shell open file when process is running, fix shutdown
This commit is contained in:
@@ -169,8 +169,9 @@ std::mutex task_mutex;
|
||||
- (void)terminateGL
|
||||
{
|
||||
CGLLockContext([[self openGLContext] CGLContextObj]);
|
||||
CVDisplayLinkRelease(dl);
|
||||
App::I.terminate();
|
||||
CGLUnlockContext([[self openGLContext] CGLContextObj]);
|
||||
CVDisplayLinkRelease(dl);
|
||||
}
|
||||
|
||||
// This is the renderer output callback function
|
||||
@@ -445,7 +446,6 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
|
||||
@implementation Controller
|
||||
- (void)windowWillClose:(NSNotification *)notification
|
||||
{
|
||||
App::I.terminate();
|
||||
[[NSApplication sharedApplication] terminate:nil];
|
||||
}
|
||||
-(BOOL)windowShouldClose:(NSWindow *)sender
|
||||
@@ -472,7 +472,8 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
|
||||
- (BOOL)application:(NSApplication *)sender openFile:(NSString *)filename
|
||||
{
|
||||
LOG("open file %s", [filename UTF8String]);
|
||||
//App::I.open_document([filename UTF8String]);
|
||||
if (view && view->gl_ready)
|
||||
App::I.open_document([filename UTF8String]);
|
||||
file2open = filename;
|
||||
return YES;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user