1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-08 16:07:16 +00:00

cocoa: don't load hardcoded icon if running from bundle

Makes ricers happy.
This commit is contained in:
Stefano Pigozzi 2015-05-25 08:58:32 +02:00
parent 05a75d0a76
commit 34875413fa

View File

@ -154,6 +154,9 @@ static const char macosx_icon[] =
static void set_application_icon(NSApplication *app)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSBundle *bundle = [NSBundle mainBundle];
if ([bundle pathForResource:@"icon" ofType:@"icns"])
return;
NSData *icon_data = [NSData dataWithBytesNoCopy:(void *)macosx_icon
length:sizeof(macosx_icon)
freeWhenDone:NO];