summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2020-01-19 16:23:59 +0100
committerder richter <der.richter@gmx.de>2020-01-26 12:12:22 +0100
commit3275cd04b7531e3fb5528246eb04d40b8f2332e3 (patch)
tree6699958df05dfd1038ac094d454aa6b59410a2c1 /osdep
parent465f48fb0c860e7b2604e00008baab887a202c0d (diff)
downloadmpv-3275cd04b7531e3fb5528246eb04d40b8f2332e3.tar.bz2
mpv-3275cd04b7531e3fb5528246eb04d40b8f2332e3.tar.xz
cocoa-cb: add support for forcing the dedicated GPU for rendering
this deprecates the old cocoa backend only option and moves it to the general macos ones. add support for the new option in the cocoa-cb layer creation and use the new option in the olde cocoa backend. Fixes #7272
Diffstat (limited to 'osdep')
-rw-r--r--osdep/macosx_application.h3
-rw-r--r--osdep/macosx_application.m1
2 files changed, 4 insertions, 0 deletions
diff --git a/osdep/macosx_application.h b/osdep/macosx_application.h
index 7e233987fd..19babc5458 100644
--- a/osdep/macosx_application.h
+++ b/osdep/macosx_application.h
@@ -27,6 +27,7 @@ struct macos_opts {
int macos_title_bar_material;
struct m_color macos_title_bar_color;
int macos_fs_animation_duration;
+ int macos_force_dedicated_gpu;
int cocoa_cb_sw_renderer;
int cocoa_cb_10bit_context;
};
@@ -35,4 +36,6 @@ struct macos_opts {
int cocoa_main(int argc, char *argv[]);
void cocoa_register_menu_item_action(MPMenuKey key, void* action);
+extern const struct m_sub_options macos_conf;
+
#endif /* MPV_MACOSX_APPLICATION */
diff --git a/osdep/macosx_application.m b/osdep/macosx_application.m
index d553c69158..7bf0737af9 100644
--- a/osdep/macosx_application.m
+++ b/osdep/macosx_application.m
@@ -62,6 +62,7 @@ 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_FLAG("macos-force-dedicated-gpu", macos_force_dedicated_gpu, 0),
OPT_CHOICE("cocoa-cb-sw-renderer", cocoa_cb_sw_renderer, 0,
({"auto", -1}, {"no", 0}, {"yes", 1})),
OPT_FLAG("cocoa-cb-10bit-context", cocoa_cb_10bit_context, 0),