mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-25 05:48:03 -04:00
Recalculate WIDESCREENDELTA before creation of hud widgets (#121)
This commit is contained in:
parent
c874200f3f
commit
b704f5f7a0
@ -451,6 +451,9 @@ void HU_Start(void)
|
||||
message_count = (message_timer * TICRATE) / 1000 + 1;
|
||||
chat_count = (chat_msg_timer * TICRATE) / 1000 + 1;
|
||||
|
||||
// [crispy] re-calculate WIDESCREENDELTA
|
||||
I_GetScreenDimensions();
|
||||
|
||||
// create the message widget
|
||||
// messages to player in upper-left of screen
|
||||
HUlib_initSText(&w_message, HU_MSGX, HU_MSGY, HU_MSGHEIGHT, hu_font,
|
||||
|
@ -1079,12 +1079,21 @@ void I_GetScreenDimensions(void)
|
||||
SDL_DisplayMode mode;
|
||||
int w = 16, h = 10;
|
||||
int ah;
|
||||
static boolean firsttime = true;
|
||||
|
||||
SCREENWIDTH = ORIGWIDTH;
|
||||
SCREENHEIGHT = ORIGHEIGHT;
|
||||
|
||||
NONWIDEWIDTH = SCREENWIDTH;
|
||||
|
||||
if (firsttime)
|
||||
{
|
||||
useaspect = cfg_aspectratio;
|
||||
if(M_CheckParm("-aspect"))
|
||||
useaspect = true;
|
||||
firsttime = false;
|
||||
}
|
||||
|
||||
ah = useaspect ? (6 * SCREENHEIGHT / 5) : SCREENHEIGHT;
|
||||
|
||||
if (SDL_GetCurrentDisplayMode(video_display, &mode) == 0)
|
||||
@ -1196,10 +1205,6 @@ static void I_InitGraphicsMode(void)
|
||||
else if(M_CheckParm("-5"))
|
||||
scalefactor = 5;
|
||||
|
||||
useaspect = cfg_aspectratio;
|
||||
if(M_CheckParm("-aspect"))
|
||||
useaspect = true;
|
||||
|
||||
I_GetWindowPosition(&v_x, &v_y, window_width, window_height);
|
||||
|
||||
// [FG] create rendering window
|
||||
|
Loading…
x
Reference in New Issue
Block a user