mirror of
https://github.com/love2d/love.git
synced 2026-08-13 09:00:54 +02:00
Switched global thread to love._curthread and made love.thread.getThread() return that
This commit is contained in:
@@ -44,7 +44,9 @@ namespace sdl
|
||||
luaopen_love_thread(L);
|
||||
lua_pushstring(L, comm->getName());
|
||||
luax_convobj(L, lua_gettop(L), "thread", "getThread");
|
||||
lua_setglobal(L, "thread");
|
||||
lua_getglobal(L, "love");
|
||||
lua_pushvalue(L, -2);
|
||||
lua_setfield(L, -2, "_curthread");
|
||||
if(luaL_dostring(L, comm->getCode()) == 1)
|
||||
{
|
||||
ThreadVariant *v = new ThreadVariant(lua_tostring(L, -1));
|
||||
|
||||
Reference in New Issue
Block a user