Add core.sleep_ms to async main menu API
This commit is contained in:
parent
9bd686216a
commit
c0f4228096
@ -938,6 +938,14 @@ int ModApiMainMenu::l_do_async_callback(lua_State *L)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
int ModApiMainMenu::l_sleep_ms(lua_State *L)
|
||||||
|
{
|
||||||
|
int delay = luaL_checkinteger(L, 1);
|
||||||
|
sleep_ms(delay);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
void ModApiMainMenu::Initialize(lua_State *L, int top)
|
void ModApiMainMenu::Initialize(lua_State *L, int top)
|
||||||
{
|
{
|
||||||
@ -1011,4 +1019,5 @@ void ModApiMainMenu::InitializeAsync(lua_State *L, int top)
|
|||||||
API_FCT(get_min_supp_proto);
|
API_FCT(get_min_supp_proto);
|
||||||
API_FCT(get_max_supp_proto);
|
API_FCT(get_max_supp_proto);
|
||||||
//API_FCT(gettext); (gettext lib isn't threadsafe)
|
//API_FCT(gettext); (gettext lib isn't threadsafe)
|
||||||
|
API_FCT(sleep_ms);
|
||||||
}
|
}
|
||||||
|
@ -158,6 +158,8 @@ private:
|
|||||||
// async
|
// async
|
||||||
static int l_do_async_callback(lua_State *L);
|
static int l_do_async_callback(lua_State *L);
|
||||||
|
|
||||||
|
static int l_sleep_ms(lua_State *L);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user