From: Antoine Cellerier Date: Wed, 30 Dec 2009 14:26:45 +0000 (+0100) Subject: Only default to rc.lua if module loading wasn't forced. This still isn't perfect... X-Git-Tag: 1.1.0-ff~1599 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=c9d2fec1cf62e423a428b33a15a424387da37edb;p=vlc Only default to rc.lua if module loading wasn't forced. This still isn't perfect. (And there seems to be an issue in module_need(), wasn't -I intf1,intf2 supposed to first try loading intf1 and fallback to intf2 if intf1 couldn't load? For example -I rc,qt4 should load rc and not qt4, which is the case in 0.8.6 but doesn't seem to be the case in 1.0.0 ... looks like this is due to bb0d752792bc6ded51e383240cadf399b9ca71fa removing i_shortcut_bonus) --- diff --git a/modules/misc/lua/intf.c b/modules/misc/lua/intf.c index 18b8334f1f..46c52c0b70 100644 --- a/modules/misc/lua/intf.c +++ b/modules/misc/lua/intf.c @@ -98,7 +98,6 @@ static const struct const char *psz_shortcut; const char *psz_name; } pp_shortcuts[] = { - { "", "rc" }, { "luarc", "rc" }, { "rc", "rc" }, { "luahotkeys", "hotkeys" }, @@ -151,10 +150,16 @@ int Open_LuaIntf( vlc_object_t *p_this ) lua_State *L; config_ChainParse( p_intf, "lua-", ppsz_intf_options, p_intf->p_cfg ); - char *psz_name = GetModuleName( p_intf ); + char *psz_name = NULL; + + if( !p_intf->b_force ) + psz_name = strdup( "rc" ); + else + psz_name = GetModuleName( p_intf ); + if( !psz_name ) psz_name = strdup( "dummy" ); + char *psz_config; bool b_config_set = false; - if( !psz_name ) psz_name = strdup( "dummy" ); p_intf->p_sys = (intf_sys_t*)malloc( sizeof(intf_sys_t) ); if( !p_intf->p_sys )