summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2018-07-22 23:07:32 +0200
committerJan Ekström <jeebjp@gmail.com>2018-09-30 23:38:11 +0300
commit3e8fd22f0779db84827b20ae2c5c36f2e5f94a6f (patch)
tree8edbcd50dd5e1730cf4463d7df715b8e8a7ef161 /osdep
parent53a1a955d7c38ee5b35365ea99cafd4ceb5c2d3a (diff)
downloadmpv-3e8fd22f0779db84827b20ae2c5c36f2e5f94a6f.tar.bz2
mpv-3e8fd22f0779db84827b20ae2c5c36f2e5f94a6f.tar.xz
cocoa-cb: add Apple Software Renderer support
by default the pixel format creation falls back to software renderer when everything fails. this is mostly needed for VMs. additionally one can directly request an sw renderer or exclude it entirely. (cherry picked from commit 8d2d0f06403b6777e4b591fa84df57b55e9b7809)
Diffstat (limited to 'osdep')
-rw-r--r--osdep/macosx_application.h1
-rw-r--r--osdep/macosx_application.m3
2 files changed, 4 insertions, 0 deletions
diff --git a/osdep/macosx_application.h b/osdep/macosx_application.h
index c04f479c5b..0301e49fcb 100644
--- a/osdep/macosx_application.h
+++ b/osdep/macosx_application.h
@@ -23,6 +23,7 @@
struct macos_opts {
int macos_title_bar_style;
int macos_fs_animation_duration;
+ int cocoa_cb_sw_renderer;
};
// multithreaded wrapper for mpv_main
diff --git a/osdep/macosx_application.m b/osdep/macosx_application.m
index 66daa45909..ca613e04f4 100644
--- a/osdep/macosx_application.m
+++ b/osdep/macosx_application.m
@@ -49,11 +49,14 @@ const struct m_sub_options macos_conf = {
OPT_CHOICE_OR_INT("macos-fs-animation-duration",
macos_fs_animation_duration, 0, 0, 1000,
({"default", -1})),
+ OPT_CHOICE("cocoa-cb-sw-renderer", cocoa_cb_sw_renderer, 0,
+ ({"auto", -1}, {"no", 0}, {"yes", 1})),
{0}
},
.size = sizeof(struct macos_opts),
.defaults = &(const struct macos_opts){
.macos_fs_animation_duration = -1,
+ .cocoa_cb_sw_renderer = -1,
},
};