summaryrefslogtreecommitdiff
path: root/src/hud.cpp
diff options
context:
space:
mode:
authorPilzAdam <pilzadam@minetest.net>2016-04-11 23:04:42 +0200
committerPilzAdam <pilzadam@minetest.net>2016-04-11 23:04:42 +0200
commit73d4538d9463b349eedc767c47d1750a164e2b7b (patch)
tree926a732a974daf1bb3b1677cd936acb802c976d7 /src/hud.cpp
parent3b43e7e87cb83f44820838c9d4b1ab4b82467f09 (diff)
downloadminetest-73d4538d9463b349eedc767c47d1750a164e2b7b.tar.gz
minetest-73d4538d9463b349eedc767c47d1750a164e2b7b.tar.bz2
minetest-73d4538d9463b349eedc767c47d1750a164e2b7b.zip
Fix hotbar placement on displays with low screen density
Diffstat (limited to 'src/hud.cpp')
-rw-r--r--src/hud.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hud.cpp b/src/hud.cpp
index d72141899..a7d94cb84 100644
--- a/src/hud.cpp
+++ b/src/hud.cpp
@@ -214,7 +214,8 @@ void Hud::drawItems(v2s32 upperleftpos, v2s32 screen_offset, s32 itemcount,
// Position of upper left corner of bar
v2s32 pos = upperleftpos + screen_offset;
- pos *= m_hud_scaling * porting::getDisplayDensity();
+ pos.X *= m_hud_scaling * porting::getDisplayDensity();
+ pos.Y *= m_hud_scaling * porting::getDisplayDensity();
if (hotbar_image != player->hotbar_image) {
hotbar_image = player->hotbar_image;