From f687f32e5512c764d5f7406608bbc012e5222b8e Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sun, 14 Jul 2019 21:44:11 -0400 Subject: [PATCH 1/2] Windows 10 1903 behaves erraticly when changing the palette, so adopt the dirtying mechanism from X11 to update the full screen on a pause, after init_color(). Could be more selective. --- wincon/pdcscrn.c | 2 ++ wincon/pdcutil.c | 8 ++++++++ wincon/pdcwin.h | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/wincon/pdcscrn.c b/wincon/pdcscrn.c index 7f0525ba..20f7143f 100644 --- a/wincon/pdcscrn.c +++ b/wincon/pdcscrn.c @@ -694,6 +694,8 @@ int PDC_color_content(short color, short *red, short *green, short *blue) int PDC_init_color(short color, short red, short green, short blue) { + pdc_dirty = TRUE; + if (color < 16) { COLORREF *color_table = _get_colors(); diff --git a/wincon/pdcutil.c b/wincon/pdcutil.c index a40cf451..08a9efc7 100644 --- a/wincon/pdcutil.c +++ b/wincon/pdcutil.c @@ -2,6 +2,8 @@ #include "pdcwin.h" +bool pdc_dirty = FALSE; + void PDC_beep(void) { PDC_LOG(("PDC_beep() - called\n")); @@ -14,6 +16,12 @@ void PDC_napms(int ms) { PDC_LOG(("PDC_napms() - called: ms=%d\n", ms)); + if (pdc_dirty) + { + pdc_dirty = FALSE; + wrefresh(curscr); + } + if ((SP->termattrs & A_BLINK) && (GetTickCount() >= pdc_last_blink + 500)) PDC_blink_text(); diff --git a/wincon/pdcwin.h b/wincon/pdcwin.h index dab1f76b..b065155f 100644 --- a/wincon/pdcwin.h +++ b/wincon/pdcwin.h @@ -22,6 +22,6 @@ extern DWORD pdc_quick_edit; extern DWORD pdc_last_blink; extern short pdc_curstoreal[16], pdc_curstoansi[16]; extern short pdc_oldf, pdc_oldb, pdc_oldu; -extern bool pdc_conemu, pdc_ansi; +extern bool pdc_conemu, pdc_ansi, pdc_dirty; extern void PDC_blink_text(void); From 63f0a4d9122b140bc81964c79d2088a36857902e Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sun, 14 Jul 2019 23:02:58 -0400 Subject: [PATCH 2/2] Updated for SDL2_ttf 2.0.15. --- sdl2/Makefile | 4 ++-- sdl2/Makefile.vc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdl2/Makefile b/sdl2/Makefile index ff2890e8..35a934b4 100644 --- a/sdl2/Makefile +++ b/sdl2/Makefile @@ -12,8 +12,8 @@ ifeq ($(OS),Windows_NT) SFLAGS = -Ic:/sdl2-2.0.9/$(PLATFORM)/include/SDL2 SLIBS = -Lc:/sdl2-2.0.9/$(PLATFORM)/lib -lSDL2main -lSDL2 - TFLAGS = -Ic:/sdl2_ttf-2.0.14/$(PLATFORM)/include/SDL2 - TLIBS =-Lc:/sdl2_ttf-2.0.14/$(PLATFORM)/lib -lSDL2_ttf + TFLAGS = -Ic:/sdl2_ttf-2.0.15/$(PLATFORM)/include/SDL2 + TLIBS =-Lc:/sdl2_ttf-2.0.15/$(PLATFORM)/lib -lSDL2_ttf DEMOFLAGS = -mwindows else diff --git a/sdl2/Makefile.vc b/sdl2/Makefile.vc index a516c352..5143295c 100644 --- a/sdl2/Makefile.vc +++ b/sdl2/Makefile.vc @@ -37,8 +37,8 @@ LDFLAGS = !ifdef WIDE WIDEOPT = -DPDC_WIDE -TTF_INCLUDE = -IC:\SDL2_ttf-2.0.14\include -TTF_LIB = C:\SDL2_ttf-2.0.14\lib\$(PLATFORM)\SDL2_ttf.lib +TTF_INCLUDE = -IC:\SDL2_ttf-2.0.15\include +TTF_LIB = C:\SDL2_ttf-2.0.15\lib\$(PLATFORM)\SDL2_ttf.lib !endif !ifdef UTF8