Fix hotbar placement on displays with low screen density
authorPilzAdam <pilzadam@minetest.net>
Mon, 11 Apr 2016 21:04:42 +0000 (23:04 +0200)
committerPilzAdam <pilzadam@minetest.net>
Mon, 11 Apr 2016 21:04:42 +0000 (23:04 +0200)
src/hud.cpp

index d72141899afd63b391d7e124eb0228fdaad00684..a7d94cb842173d5ad38f6d80b377b3be7c1fa46f 100644 (file)
@@ -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;