From 1168c6c63ce1dfa2bad35ffad16e4328120cd043 Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 18 Jul 2017 21:44:42 +0200 Subject: [PATCH] Applied two EGA-related commits from mainline PCem. --- src/VIDEO/vid_ega.c | 2 ++ src/VIDEO/video.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/VIDEO/vid_ega.c b/src/VIDEO/vid_ega.c index 0a2e60944..70201c18a 100644 --- a/src/VIDEO/vid_ega.c +++ b/src/VIDEO/vid_ega.c @@ -591,6 +591,8 @@ void ega_poll(void *p) if (ega->sc == (ega->crtc[9] & 31)) { ega->sc = 0; + if (ega->sc == (ega->crtc[11] & 31)) + ega->con = 0; ega->maback += (ega->rowoffset << 3); ega->maback &= ega->vrammask; diff --git a/src/VIDEO/video.c b/src/VIDEO/video.c index 6e63ad81b..5a7d2dc78 100644 --- a/src/VIDEO/video.c +++ b/src/VIDEO/video.c @@ -643,6 +643,8 @@ void video_wait_for_buffer() void video_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h) { + if (h <= 0) + return; video_wait_for_blit(); blit_data.busy = 1; blit_data.buffer_in_use = 1; @@ -658,6 +660,8 @@ void video_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h) void video_blit_memtoscreen_8(int x, int y, int w, int h) { + if (h <= 0) + return; video_wait_for_blit(); blit_data.busy = 1; blit_data.x = x;