fix Open_popup() once again. This time its OK when Menu_factor_Y != 1

This commit is contained in:
Thomas Bernard 2018-12-07 18:35:33 +01:00 committed by Adrien Destugues
parent f6dfc1f66f
commit 387b4c33f9

View File

@ -2353,8 +2353,8 @@ void Open_popup(word x_pos, word y_pos, word width,word height)
if (height*Menu_factor_Y > Screen_height)
height = Screen_height/Menu_factor_Y;
if ((y_pos + height)*Menu_factor_Y > Screen_height) // fix dropdown that would get bellow the screen
y_pos = Screen_height/Menu_factor_Y - height;
if (y_pos + height*Menu_factor_Y > Screen_height) // fix dropdown that would get bellow the screen
y_pos = Screen_height - height*Menu_factor_Y;
Window_width=width;
Window_height=height;