From 33094a164d9d7133a45fd1ad7f5fc014821bc21c Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 29 Sep 2019 10:32:03 +0200 Subject: [PATCH] Fixed EGA display broken by an earlier commit, fixes #417. --- src/video/vid_cga.c | 8 +++----- src/video/vid_ega.c | 17 +++++++++-------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/video/vid_cga.c b/src/video/vid_cga.c index b2af672ea..135b47491 100644 --- a/src/video/vid_cga.c +++ b/src/video/vid_cga.c @@ -8,13 +8,13 @@ * * Emulation of the old and new IBM CGA graphics cards. * - * Version: @(#)vid_cga.c 1.0.19 2019/01/18 + * Version: @(#)vid_cga.c 1.0.20 2019/09/29 * * Authors: Sarah Walker, * Miran Grca, * - * Copyright 2008-2018 Sarah Walker. - * Copyright 2016-2018 Miran Grca. + * Copyright 2008-2019 Sarah Walker. + * Copyright 2016-2019 Miran Grca. */ #include #include @@ -451,8 +451,6 @@ cga_poll(void *p) video_force_resize_get())) { xsize = xs_temp; ysize = ys_temp; - if (xsize < 64) xsize = 656; - if (ysize < 32) ysize = 400; set_screen_size(xsize, ysize + 16); if (video_force_resize_get()) diff --git a/src/video/vid_ega.c b/src/video/vid_ega.c index a2110d776..3dd13df61 100644 --- a/src/video/vid_ega.c +++ b/src/video/vid_ega.c @@ -9,7 +9,7 @@ * Emulation of the EGA, Chips & Technologies SuperEGA, and * AX JEGA graphics cards. * - * Version: @(#)vid_ega.c 1.0.20 2019/09/26 + * Version: @(#)vid_ega.c 1.0.21 2019/09/29 * * Authors: Sarah Walker, * Miran Grca, @@ -554,6 +554,11 @@ void ega_poll(void *p) ys_temp = ega->lastline - ega->firstline + 1; if ((xs_temp > 0) && (ys_temp > 1)) { + if (xs_temp < 64) + xs_temp = 640; + if (ys_temp < 32) + ys_temp = 200; + x_add = enable_overscan ? 8 : 0; y_add = enable_overscan ? overscan_y : 0; x_add_ex = enable_overscan ? 16 : 0; @@ -566,14 +571,10 @@ void ega_poll(void *p) } else suppress_overscan = 0; - xs_temp = x; - ys_temp = ega->lastline - ega->firstline + 1; - if (xs_temp < 64) - xs_temp = 640; - if (ys_temp < 32) - ys_temp = 200; - if ((xs_temp != xsize) || (ys_temp != ysize) || video_force_resize_get()) { + xsize = xs_temp; + ysize = ys_temp; + if (ega->vres) set_screen_size(xsize + x_add_ex, (ysize << 1) + y_add_ex); else