mirror of
https://github.com/mpv-player/mpv
synced 2024-12-19 21:31:52 +00:00
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
Block a user