1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

[CSM] add screenshot api lua (#5674)

* [CSM] add screenshot api lua
This commit is contained in:
Vincent Glize 2017-04-29 09:16:06 +02:00 committed by Loïc Blot
parent b662a4577d
commit 19960e26c6
4 changed files with 14 additions and 0 deletions

View file

@ -241,6 +241,13 @@ int ModApiClient::l_get_protocol_version(lua_State *L)
return 1;
}
int ModApiClient::l_take_screenshot(lua_State *L)
{
Client *client = getClient(L);
client->makeScreenshot(client->getDevice());
return 0;
}
void ModApiClient::Initialize(lua_State *L, int top)
{
API_FCT(get_current_modname);
@ -259,4 +266,5 @@ void ModApiClient::Initialize(lua_State *L, int top)
API_FCT(sound_play);
API_FCT(sound_stop);
API_FCT(get_protocol_version);
API_FCT(take_screenshot);
}