[vlc-devel] commit: 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 ) (Antoine Cellerier )

git version control git at videolan.org
Wed Dec 30 15:35:38 CET 2009


vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Wed Dec 30 15:26:45 2009 +0100| [c9d2fec1cf62e423a428b33a15a424387da37edb] | committer: Antoine Cellerier 

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)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c9d2fec1cf62e423a428b33a15a424387da37edb
---

 modules/misc/lua/intf.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/modules/misc/lua/intf.c b/modules/misc/lua/intf.c
index 18b8334..46c52c0 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 )




More information about the vlc-devel mailing list