Add love.window.getPointer, returns a SDL_Window* as lightuserdata.

This commit is contained in:
Sasha Szpakowski
2024-01-08 21:09:40 -04:00
parent ecd9b007aa
commit 6feedc8222
4 changed files with 10 additions and 3 deletions
+7
View File
@@ -647,6 +647,12 @@ int w_requestAttention(lua_State *L)
return 0;
}
int w_getPointer(lua_State *L)
{
lua_pushlightuserdata(L, instance()->getHandle());
return 1;
}
static const luaL_Reg functions[] =
{
{ "getDisplayCount", w_getDisplayCount },
@@ -688,6 +694,7 @@ static const luaL_Reg functions[] =
{ "isMinimized", w_isMinimized },
{ "showMessageBox", w_showMessageBox },
{ "requestAttention", w_requestAttention },
{ "getPointer", w_getPointer },
{ 0, 0 }
};