mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-30 19:22:14 +00:00
Add minetest.get_player_window_information() (#12367)
This commit is contained in:
parent
fbbdae93ee
commit
39f4d26177
23 changed files with 345 additions and 35 deletions
|
@ -40,6 +40,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "util/pointedthing.h"
|
||||
#include "util/serialize.h"
|
||||
#include "util/srp.h"
|
||||
#include "clientdynamicinfo.h"
|
||||
|
||||
void Server::handleCommand_Deprecated(NetworkPacket* pkt)
|
||||
{
|
||||
|
@ -1841,3 +1842,18 @@ void Server::handleCommand_HaveMedia(NetworkPacket *pkt)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Server::handleCommand_UpdateClientInfo(NetworkPacket *pkt)
|
||||
{
|
||||
ClientDynamicInfo info;
|
||||
*pkt >> info.render_target_size.X;
|
||||
*pkt >> info.render_target_size.Y;
|
||||
*pkt >> info.real_gui_scaling;
|
||||
*pkt >> info.real_hud_scaling;
|
||||
*pkt >> info.max_fs_size.X;
|
||||
*pkt >> info.max_fs_size.Y;
|
||||
|
||||
session_t peer_id = pkt->getPeerId();
|
||||
RemoteClient *client = getClient(peer_id, CS_Invalid);
|
||||
client->setDynamicInfo(info);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue