diff options
-rw-r--r-- | DOCS/client_api_examples/cocoabasic.m | 3 | ||||
-rw-r--r-- | DOCS/man/options.rst | 10 | ||||
-rw-r--r-- | player/client.c | 2 | ||||
-rw-r--r-- | player/core.h | 1 | ||||
-rw-r--r-- | player/main.c | 9 |
5 files changed, 15 insertions, 10 deletions
diff --git a/DOCS/client_api_examples/cocoabasic.m b/DOCS/client_api_examples/cocoabasic.m index 3324f13845..35637f0a9f 100644 --- a/DOCS/client_api_examples/cocoabasic.m +++ b/DOCS/client_api_examples/cocoabasic.m @@ -90,6 +90,9 @@ static void wakeup(void *); // NOTE: Interaction with the window seems to be broken for now. check_error(mpv_set_option_string(mpv, "input-default-bindings", "yes")); + // for testing! + check_error(mpv_set_option_string(mpv, "input-media-keys", "yes")); + check_error(mpv_initialize(mpv)); // Register to be woken up whenever mpv generates new events. diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 0ef720c438..09e5b0b520 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -2175,8 +2175,9 @@ Input or intend to read from stdin later on via the loadfile or loadlist slave commands. -``--input-appleremote``, ``--no-input-appleremote`` - Enable/disable AppleIR remote support. Enabled by default. +``--input-appleremote=<yes|no>`` + (OS X only) + Enable/disable Apple Remote support. Enabled by default (except for libmpv). ``--input-cursor``, ``--no-input-cursor`` Permit mpv to receive pointer events reported by the video output @@ -2196,8 +2197,9 @@ Input (LIRC only) Specifies a configuration file for LIRC (default: ``~/.lircrc``). -``--input-media-keys``, ``--no-input-media-keys`` - OS X only: Enabled by default. Enables/disable media keys support. +``--input-media-keys=<yes|no>`` + (OS X only) + Enable/disable media keys support. Enabled by default (except for libmpv). ``--input-right-alt-gr``, ``--no-input-right-alt-gr`` (Cocoa and Windows only) diff --git a/player/client.c b/player/client.c index ca4317d89e..ff94c517a6 100644 --- a/player/client.c +++ b/player/client.c @@ -405,6 +405,8 @@ mpv_handle *mpv_create(void) mpv_set_option_string(ctx, "input-default-bindings", "no"); mpv_set_option_string(ctx, "input-vo-keyboard", "no"); mpv_set_option_string(ctx, "input-lirc", "no"); + mpv_set_option_string(ctx, "input-media-keys", "no"); + mpv_set_option_string(ctx, "input-appleremote", "no"); } else { mp_destroy(mpctx); } diff --git a/player/core.h b/player/core.h index d25322ecd1..31e2657e93 100644 --- a/player/core.h +++ b/player/core.h @@ -150,7 +150,6 @@ enum playback_status { typedef struct MPContext { bool initialized; - bool is_cplayer; bool autodetach; struct mpv_global *global; struct MPOpts *opts; diff --git a/player/main.c b/player/main.c index bf14b25340..906e6d34bf 100644 --- a/player/main.c +++ b/player/main.c @@ -72,6 +72,8 @@ #if HAVE_COCOA_APPLICATION #include "osdep/macosx_application.h" +#endif +#if HAVE_COCOA #include "osdep/macosx_events.h" #endif @@ -418,9 +420,8 @@ int mp_initialize(struct MPContext *mpctx) mp_get_resume_defaults(mpctx); -#if HAVE_COCOA_APPLICATION - if (mpctx->is_cplayer) - cocoa_set_input_context(mpctx->input); +#if HAVE_COCOA + cocoa_set_input_context(mpctx->input); #endif if (opts->force_vo) { @@ -465,8 +466,6 @@ int mpv_main(int argc, char *argv[]) struct MPContext *mpctx = mp_create(); struct MPOpts *opts = mpctx->opts; - mpctx->is_cplayer = true; - char *verbose_env = getenv("MPV_VERBOSE"); if (verbose_env) opts->verbose = atoi(verbose_env); |