mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Add love.window.getPointer, returns a SDL_Window* as lightuserdata.
This commit is contained in:
@@ -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 }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user