Minetest 5.9.0-dev
 
Loading...
Searching...
No Matches
clientdynamicinfo.h
Go to the documentation of this file.
1/*
2Minetest
3Copyright (C) 2022-3 rubenwardy <rw@rubenwardy.com>
4
5This program is free software; you can redistribute it and/or modify
6it under the terms of the GNU Lesser General Public License as published by
7the Free Software Foundation; either version 2.1 of the License, or
8(at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU Lesser General Public License for more details.
14
15You should have received a copy of the GNU Lesser General Public License along
16with this program; if not, write to the Free Software Foundation, Inc.,
1751 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18*/
19
20#pragma once
21
23
24
26{
27public:
33
34 bool equal(const ClientDynamicInfo &other) const {
35 return render_target_size == other.render_target_size &&
36 std::abs(real_gui_scaling - other.real_gui_scaling) < 0.001f &&
37 std::abs(real_hud_scaling - other.real_hud_scaling) < 0.001f &&
39 }
40
41#ifndef SERVER
43
44private:
45 static v2f32 calculateMaxFSSize(v2u32 render_target_size, f32 gui_scaling);
46#endif
47};
core::vector2d< f32 > v2f32
Definition: irr_v2d.h:30
core::vector2d< u32 > v2u32
Definition: irr_v2d.h:29
Definition: clientdynamicinfo.h:26
static v2f32 calculateMaxFSSize(v2u32 render_target_size, f32 gui_scaling)
Definition: clientdynamicinfo.cpp:45
static ClientDynamicInfo getCurrent()
Definition: clientdynamicinfo.cpp:28
v2u32 render_target_size
Definition: clientdynamicinfo.h:28
bool equal(const ClientDynamicInfo &other) const
Definition: clientdynamicinfo.h:34
f32 real_gui_scaling
Definition: clientdynamicinfo.h:29
f32 real_hud_scaling
Definition: clientdynamicinfo.h:30
bool touch_controls
Definition: clientdynamicinfo.h:32
v2f32 max_fs_size
Definition: clientdynamicinfo.h:31