From 904f180eaa1e7e08cb3564023057c3c916b71e97 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Fri, 9 Jan 2009 07:56:07 +0000 Subject: [PATCH] Force a cursor position update before playing ANSI music. Since ANSI music is usually played in the foreground, the cursor could remain in the wrong position for extended periods of time. --- src/conio/cterm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/conio/cterm.c b/src/conio/cterm.c index 634dbe0fba..a5fd319ab3 100644 --- a/src/conio/cterm.c +++ b/src/conio/cterm.c @@ -1463,8 +1463,15 @@ char *cterm_write(unsigned char *buf, int buflen, char *retbuf, size_t retsize, } } else if (cterm.music) { - if(ch[0]==14) + if(ch[0]==14) { + hold_update=0; + puttext_can_move=0; + gotoxy(wherex(),wherey()); + _setcursortype(cterm.cursor); + hold_update=1; + puttext_can_move=1; play_music(); + } else { if(strchr(musicchars,ch[0])!=NULL) strcat(cterm.musicbuf,ch); -- GitLab