mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Add support for dpi based HUD scaling
Add support for (configurable) multiline hotbar Improved screensize handling Add userdefined gui scale by BlockMen
This commit is contained in:
@@ -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)));
|
||||
|
Reference in New Issue
Block a user