summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2014-10-09 21:02:47 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2014-10-09 22:14:41 +0200
commitca353fcf9268fc4630143db21bd1b3e7c806b889 (patch)
tree63a839db8bf7324881eabb7d721cebdf23971082 /player
parentd1e8bb0f9be24106a15debf133ba5778dcb59056 (diff)
downloadmpv-ca353fcf9268fc4630143db21bd1b3e7c806b889.tar.bz2
mpv-ca353fcf9268fc4630143db21bd1b3e7c806b889.tar.xz
libmpv/cocoa: make global events work and get rid of is_cplayer
After @frau's split of macosx_events from macosx_application, `is_cplayer' is not needed anymore. At the moment only global events such as Media Keys and Apple Remote work, because the VO-level ones were hardcoded to be disabled. (that will be fix in a later commit ).
Diffstat (limited to 'player')
-rw-r--r--player/client.c2
-rw-r--r--player/core.h1
-rw-r--r--player/main.c9
3 files changed, 6 insertions, 6 deletions
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);