diff options
author | rubenwardy <rw@rubenwardy.com> | 2023-02-27 22:58:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-27 22:58:41 +0000 |
commit | 39f4d26177ec1c8f246133c532a42ef7429bc36d (patch) | |
tree | 910b6a6635adf37eaba1d7410e83fad14f15bb90 /src/client/client.cpp | |
parent | fbbdae93ee324584089efaf8e880a1378f6a2ad6 (diff) | |
download | minetest-39f4d26177ec1c8f246133c532a42ef7429bc36d.tar.xz |
Add minetest.get_player_window_information() (#12367)
Diffstat (limited to 'src/client/client.cpp')
-rw-r--r-- | src/client/client.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp index 6544dbaf6..6f2647d50 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -1415,6 +1415,17 @@ void Client::sendHaveMedia(const std::vector<u32> &tokens) Send(&pkt); } +void Client::sendUpdateClientInfo(const ClientDynamicInfo& info) +{ + NetworkPacket pkt(TOSERVER_UPDATE_CLIENT_INFO, 4*2 + 4 + 4 + 4*2); + pkt << (u32)info.render_target_size.X << (u32)info.render_target_size.Y; + pkt << info.real_gui_scaling; + pkt << info.real_hud_scaling; + pkt << (f32)info.max_fs_size.X << (f32)info.max_fs_size.Y; + + Send(&pkt); +} + void Client::removeNode(v3s16 p) { std::map<v3s16, MapBlock*> modified_blocks; |