forked from len0rd/rockbox
Lua:
* add action_get_touchscreen_press wrapper * fix kbd_input wrapper * rework luaL_loadfile * add rb.contexts git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21046 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
475b5dc2bb
commit
0f7e4e36ae
6 changed files with 105 additions and 74 deletions
|
@ -46,23 +46,6 @@ static void rocklua_openlibs(lua_State *L) {
|
|||
}
|
||||
}
|
||||
|
||||
char curpath[MAX_PATH];
|
||||
static void fill_curpath(const char* filename)
|
||||
{
|
||||
char* pos = rb->strrchr(filename, '/');
|
||||
|
||||
if(pos != NULL)
|
||||
{
|
||||
int len = (int)(pos - filename);
|
||||
|
||||
if(len > 0)
|
||||
memcpy(curpath, filename, len);
|
||||
|
||||
curpath[len] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***************** Plugin Entry Point *****************/
|
||||
enum plugin_status plugin_start(const void* parameter)
|
||||
{
|
||||
|
@ -79,7 +62,6 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
else
|
||||
{
|
||||
filename = (char*) parameter;
|
||||
fill_curpath(filename);
|
||||
|
||||
lua_State *L = luaL_newstate();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue