diff options
author | sapier <Sapier at GMX dot net> | 2014-04-05 14:12:36 +0200 |
---|---|---|
committer | sapier <Sapier at GMX dot net> | 2014-04-27 21:53:13 +0200 |
commit | 1838a3fd696782b1733a435bbb25accf3e40d1f3 (patch) | |
tree | 9edee41b26d5307b1d2e4626e65bb372a3d8cab7 /src/camera.cpp | |
parent | 8d315347100f1d261bb496b6c73f8cab5d2b7a41 (diff) | |
download | minetest-1838a3fd696782b1733a435bbb25accf3e40d1f3.tar.gz minetest-1838a3fd696782b1733a435bbb25accf3e40d1f3.tar.bz2 minetest-1838a3fd696782b1733a435bbb25accf3e40d1f3.zip |
Add support for dpi based HUD scaling
Add support for (configurable) multiline hotbar
Improved screensize handling
Add userdefined gui scale by BlockMen
Diffstat (limited to 'src/camera.cpp')
-rw-r--r-- | src/camera.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/camera.cpp b/src/camera.cpp index b49e8e748..254827803 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -249,7 +249,7 @@ void Camera::step(f32 dtime) } void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime, - v2u32 screensize, f32 tool_reload_ratio, + f32 tool_reload_ratio, int current_camera_mode, ClientEnvironment &c_env) { // Get player position @@ -422,7 +422,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime, fov_degrees = MYMIN(fov_degrees, 170.0); // FOV and aspect ratio - m_aspect = (f32)screensize.X / (f32) screensize.Y; + m_aspect = (f32) porting::getWindowSize().X / (f32) porting::getWindowSize().Y; m_fov_y = fov_degrees * M_PI / 180.0; // Increase vertical FOV on lower aspect ratios (<16:10) m_fov_y *= MYMAX(1.0, MYMIN(1.4, sqrt(16./10. / m_aspect))); |