From 6332864e4528a2d71aa3b82c97ca7e124ef33b52 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 22 Jul 2017 10:58:12 +0200 Subject: [PATCH] The emulator no longer waits for blit on window resize, fixes both the freeze on window move and the EGA half size problem on XT machines. --- src/VIDEO/vid_ega.c | 18 ++++++++++-------- src/WIN/win.c | 1 - 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/VIDEO/vid_ega.c b/src/VIDEO/vid_ega.c index 10148ad55..49cf3358a 100644 --- a/src/VIDEO/vid_ega.c +++ b/src/VIDEO/vid_ega.c @@ -532,13 +532,16 @@ void ega_poll(void *p) } else if (!(ega->gdcreg[6] & 1)) { - if (ega_jega_enabled(ega)) + if (fullchange) { - ega_render_text_jega(ega, drawcursor); - } - else - { - ega_render_text_standard(ega, drawcursor); + if (ega_jega_enabled(ega)) + { + ega_render_text_jega(ega, drawcursor); + } + else + { + ega_render_text_standard(ega, drawcursor); + } } } else @@ -639,7 +642,7 @@ void ega_poll(void *p) if (ega->interlace && !ega->oddeven) ega->lastline++; if (ega->interlace && ega->oddeven) ega->firstline--; - if ((x != xsize || (ega->lastline - ega->firstline) != ysize) || update_overscan) + if ((x != xsize || (ega->lastline - ega->firstline + 1) != ysize) || update_overscan) { xsize = x; ysize = ega->lastline - ega->firstline + 1; @@ -763,7 +766,6 @@ void ega_poll(void *p) ega->sc = 0; ega->dispon = 1; ega->displine = (ega->interlace && ega->oddeven) ? 1 : 0; - ega->displine = 0; ega->scrollcache = ega->attrregs[0x13] & 7; } if (ega->sc == (ega->crtc[10] & 31)) diff --git a/src/WIN/win.c b/src/WIN/win.c index 38649ac7a..f368b56f4 100644 --- a/src/WIN/win.c +++ b/src/WIN/win.c @@ -334,7 +334,6 @@ void mainthread(LPVOID param) if (!video_fullscreen && win_doresize && (winsizex > 0) && (winsizey > 0)) { - video_wait_for_blit(); SendMessage(hwndStatus, SB_GETBORDERS, 0, (LPARAM) sb_borders); GetWindowRect(ghwnd, &r); MoveWindow(hwndRender, 0, 0, winsizex, winsizey, TRUE);