From fffcf5152433850c932405bcbfd04f2b232856de Mon Sep 17 00:00:00 2001 From: deuce <> Date: Fri, 27 Feb 2015 11:27:07 +0000 Subject: [PATCH] Save/restore cursor position when entering/leaving UIFC stuff. --- src/syncterm/uifcinit.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/syncterm/uifcinit.c b/src/syncterm/uifcinit.c index f4ac62bd05..a7aa32c67e 100644 --- a/src/syncterm/uifcinit.c +++ b/src/syncterm/uifcinit.c @@ -21,6 +21,8 @@ static int uifc_initialized=0; static void (*bottomfunc)(int); int orig_ciolib_xlat; int orig_vidflags; +int orig_x; +int orig_y; int init_uifc(BOOL scrn, BOOL bottom) { int i; @@ -33,6 +35,8 @@ int init_uifc(BOOL scrn, BOOL bottom) { uifc.scrn_len=0; orig_ciolib_xlat = ciolib_xlat; orig_vidflags = getvideoflags(); + orig_x=wherex(); + orig_y=wherey(); setvideoflags(orig_vidflags&(CIOLIB_VIDEO_NOBLINK|CIOLIB_VIDEO_BGBRIGHT)); ciolib_xlat = TRUE; uifc.chars = NULL; @@ -80,6 +84,7 @@ void uifcbail(void) ciolib_xlat = orig_ciolib_xlat; setvideoflags(orig_vidflags); loadfont(NULL); + gotoxy(orig_x, orig_y); } uifc_initialized=0; } -- GitLab