mirror of https://github.com/mpv-player/mpv
examples/cocoa: never instance NSApplication with new
Cocoa expects the you instance NSApplications only through the singleton method sharedApplication.
This commit is contained in:
parent
11609ab389
commit
3137b7ac5f
|
@ -116,7 +116,7 @@ static void wakeup(void *context) {
|
|||
// Delete this if you already have a main.m.
|
||||
int main(int argc, const char * argv[]) {
|
||||
@autoreleasepool {
|
||||
NSApplication *app = [NSApplication new];
|
||||
NSApplication *app = [NSApplication sharedApplication];
|
||||
AppDelegate *delegate = [AppDelegate new];
|
||||
app.delegate = delegate;
|
||||
[app run];
|
||||
|
|
Loading…
Reference in New Issue