Browse code

ui: fix bug of incorrect initial window height in certain conditions

Dario Rodriguez authored on 29/11/2020 22:27:20
Showing 1 changed files
... ...
@@ -113,7 +113,7 @@ reui_init(int fontheight)
113 113
         ui->w=ui->fontwidth*DEFAULTWINDOWWIDTH;
114 114
         ui->w=(ui->w>ui->screenw)?ui->screenw:ui->w;
115 115
         ui->h=ui->fontheight*DEFAULTWINDOWHEIGHT;
116
-        ui->h=(ui->h>ui->screenh)?ui->screenw:ui->h;
116
+        ui->h=(ui->h>ui->screenh)?ui->screenh:ui->h;
117 117
         if((ui->win=SDL_CreateWindow(
118 118
               DEFAULTTITLEPREFIX,
119 119
               SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,