diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-26 10:44:59 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-26 10:44:59 +0300 |
commit | fb33e286b5c23dbe8d0aeaf63cd3490bed3906e3 (patch) | |
tree | 9e1eb90e7ec461afd59c3411c2be253b75a9f448 /libmenu/menu.h | |
parent | 6be229cbbfbe29ad61025051b1d903f5619e0b8a (diff) | |
download | mpv-fb33e286b5c23dbe8d0aeaf63cd3490bed3906e3.tar.bz2 mpv-fb33e286b5c23dbe8d0aeaf63cd3490bed3906e3.tar.xz |
Move global mconfig to mpctx
The global was used in the function cfg_include which handles the
-include option. Make the address available in that function by
creating a new dynamically allocated option in m_config_new that has
the address in the option's private data.
asxparser.c also used the global. Making it available through all ways
the code could get called required a number of relatively straightforward
changes to playtree and menu code.
Diffstat (limited to 'libmenu/menu.h')
-rw-r--r-- | libmenu/menu.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libmenu/menu.h b/libmenu/menu.h index 2d62a5be89..7b63fad547 100644 --- a/libmenu/menu.h +++ b/libmenu/menu.h @@ -13,6 +13,7 @@ struct m_struct_st; struct menu_s { struct MPContext *ctx; + struct m_config *mconfig; void (*draw)(menu_t* menu,mp_image_t* mpi); void (*read_cmd)(menu_t* menu,int cmd); int (*read_key)(menu_t* menu,int cmd); @@ -52,7 +53,7 @@ typedef struct menu_info_s { #define MENU_CMD_CLICK 11 /// Global init/uninit -int menu_init(struct MPContext *mpctx, char* cfg_file); +int menu_init(struct MPContext *mpctx, struct m_config *mconfig, char* cfg_file); void menu_uninit(void); /// Open a menu defined in the config file |