diff options
author | uau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-02-21 18:28:48 +0000 |
---|---|---|
committer | uau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-02-21 18:28:48 +0000 |
commit | 00b3c781965e920f9672b7568d65acd44a47c84f (patch) | |
tree | bd97c00eae7dbcc107d6888828715c881f2c2778 /libmenu/menu.c | |
parent | e1547563a929a1b923a708f7d9df062d68a2d11d (diff) | |
download | mpv-00b3c781965e920f9672b7568d65acd44a47c84f.tar.bz2 mpv-00b3c781965e920f9672b7568d65acd44a47c84f.tar.xz |
Fix menu to work with mpctx
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22302 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmenu/menu.c')
-rw-r--r-- | libmenu/menu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libmenu/menu.c b/libmenu/menu.c index 5ff760ef37..fd2fe56b19 100644 --- a/libmenu/menu.c +++ b/libmenu/menu.c @@ -52,6 +52,7 @@ typedef struct menu_def_st { char* args; } menu_def_t; +static struct MPContext *menu_ctx = NULL; static menu_def_t* menu_list = NULL; static int menu_count = 0; @@ -122,7 +123,7 @@ static int menu_parse_config(char* buffer) { #define BUF_STEP 1024 #define BUF_MIN 128 #define BUF_MAX BUF_STEP*1024 -int menu_init(char* cfg_file) { +int menu_init(struct MPContext *mpctx, char* cfg_file) { char* buffer = NULL; int bl = BUF_STEP, br = 0; int f, fd; @@ -160,6 +161,7 @@ int menu_init(char* cfg_file) { close(fd); + menu_ctx = mpctx; f = menu_parse_config(buffer); free(buffer); return f; @@ -216,6 +218,7 @@ menu_t* menu_open(char *name) { m = calloc(1,sizeof(menu_t)); m->priv_st = &(menu_list[i].type->priv_st); m->priv = m_struct_copy(m->priv_st,menu_list[i].cfg); + m->ctx = menu_ctx; if(menu_list[i].type->open(m,menu_list[i].args)) return m; if(m->priv) |