mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Fix HTTP API not being available in async mainmenu (#10086)
This commit is contained in:
parent
e99415e0c5
commit
4cb18d4874
@ -230,3 +230,10 @@ void ModApiHttp::Initialize(lua_State *L, int top)
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void ModApiHttp::InitializeAsync(lua_State *L, int top)
|
||||
{
|
||||
#if USE_CURL
|
||||
API_FCT(get_http_api);
|
||||
#endif
|
||||
}
|
||||
|
@ -50,4 +50,5 @@ private:
|
||||
|
||||
public:
|
||||
static void Initialize(lua_State *L, int top);
|
||||
static void InitializeAsync(lua_State *L, int top);
|
||||
};
|
||||
|
@ -73,6 +73,7 @@ void MainMenuScripting::initializeModApi(lua_State *L, int top)
|
||||
asyncEngine.registerStateInitializer(registerLuaClasses);
|
||||
asyncEngine.registerStateInitializer(ModApiMainMenu::InitializeAsync);
|
||||
asyncEngine.registerStateInitializer(ModApiUtil::InitializeAsync);
|
||||
asyncEngine.registerStateInitializer(ModApiHttp::InitializeAsync);
|
||||
|
||||
// Initialize async environment
|
||||
//TODO possibly make number of async threads configurable
|
||||
|
Loading…
Reference in New Issue
Block a user