mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user