summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2020-01-19 12:48:40 +0100
committerder richter <der.richter@gmx.de>2020-01-26 12:12:22 +0100
commit465f48fb0c860e7b2604e00008baab887a202c0d (patch)
tree5ed9857a88e62926a076decd4d5847911057eea4
parent695d850412144629827bdea146e6bf4bbeba39ed (diff)
downloadmpv-465f48fb0c860e7b2604e00008baab887a202c0d.tar.bz2
mpv-465f48fb0c860e7b2604e00008baab887a202c0d.tar.xz
cocoa-cb: don't set App icon when called from bundle
due to the bundle config the icon is set automatically via the bundle system mechanisms. this also makes it possible to set the icon to a custom one with the standard macOS copy paste method via the file info dialogue. Fixes #6874
-rw-r--r--video/out/cocoa_cb_common.swift4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift
index 4be17c061c..54edbefcd3 100644
--- a/video/out/cocoa_cb_common.swift
+++ b/video/out/cocoa_cb_common.swift
@@ -166,7 +166,9 @@ class CocoaCB: NSObject {
}
func setAppIcon() {
- if let app = NSApp as? Application {
+ if let app = NSApp as? Application,
+ ProcessInfo.processInfo.environment["MPVBUNDLE"] != "true"
+ {
NSApp.applicationIconImage = app.getMPVIcon()
}
}