Skip to content
Snippets Groups Projects
Commit 3f8070e4 authored by deuce's avatar deuce
Browse files

Fix height calculation when changing modes.

parent babf409d
No related branches found
No related tags found
No related merge requests found
......@@ -329,7 +329,7 @@ static int sdl_init_mode(int mode)
oldcols = cvstat.cols;
bitmap_drv_init_mode(mode, &bitmap_width, &bitmap_height);
vstat.winwidth = ((double)cvstat.winwidth / (cvstat.cols * cvstat.charwidth)) * (vstat.cols * vstat.charwidth);
vstat.winheight = ((double)cvstat.winheight / (cvstat.rows * cvstat.charheight * cvstat.vmultiplier)) * (vstat.rows * vstat.charwidth * vstat.vmultiplier);
vstat.winheight = ((double)cvstat.winheight / (cvstat.rows * cvstat.charheight * cvstat.vmultiplier)) * (vstat.rows * vstat.charheight * vstat.vmultiplier);
if (oldcols != vstat.cols) {
if (oldcols == 40) {
vstat.winwidth /= 2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment