Skip to content

Commit 73d4538

Browse files
committedApr 11, 2016
Fix hotbar placement on displays with low screen density
1 parent 3b43e7e commit 73d4538

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/hud.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ void Hud::drawItems(v2s32 upperleftpos, v2s32 screen_offset, s32 itemcount,
214214

215215
// Position of upper left corner of bar
216216
v2s32 pos = upperleftpos + screen_offset;
217-
pos *= m_hud_scaling * porting::getDisplayDensity();
217+
pos.X *= m_hud_scaling * porting::getDisplayDensity();
218+
pos.Y *= m_hud_scaling * porting::getDisplayDensity();
218219

219220
if (hotbar_image != player->hotbar_image) {
220221
hotbar_image = player->hotbar_image;

1 commit comments

Comments
 (1)

Fixer-007 commented on Apr 11, 2016

@Fixer-007
Contributor

Does not fix hud problem for me, https://i.imgur.com/jy2VbUU.png

Please sign in to comment.