X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=debian%2Fpatches%2F03_staircase-effect-fix;fp=debian%2Fpatches%2F03_staircase-effect-fix;h=514e867280f937bda99dc92122ad7eec221948ca;hb=6b1f6251013f5cf018e37ec7e67fe629a7f34455;hp=0000000000000000000000000000000000000000;hpb=da700cc38a5353b929f60a7ba2a1f19b5d640eb9;p=pkg%2Fnetris.git diff --git a/debian/patches/03_staircase-effect-fix b/debian/patches/03_staircase-effect-fix new file mode 100644 index 0000000..514e867 --- /dev/null +++ b/debian/patches/03_staircase-effect-fix @@ -0,0 +1,51 @@ +Author: Per von Zweigbergk vim:ft=diff: +Description: fix staircase effect in error message, BTS #83039 + +Index: netris-0.52/util.c +=================================================================== +--- netris-0.52.orig/util.c ++++ netris-0.52/util.c +@@ -267,6 +267,7 @@ ExtFunc volatile void die(char *msg) + + ExtFunc volatile void fatal(char *msg) + { ++ CleanupScreens (); + fprintf(stderr, "%s\n", msg); + exit(1); + } +Index: netris-0.52/curses.c +=================================================================== +--- netris-0.52.orig/curses.c ++++ netris-0.52/curses.c +@@ -57,6 +57,7 @@ static EventGenRec keyGen = + static int boardYPos[MAX_SCREENS], boardXPos[MAX_SCREENS]; + static int statusYPos, statusXPos; + static int haveColor; ++static int screens_dirty = 0; + + static char *term_vi; /* String to make cursor invisible */ + static char *term_ve; /* String to make cursor visible */ +@@ -98,6 +99,7 @@ ExtFunc void InitScreens(void) + #endif + + AtExit(CleanupScreens); ++ screens_dirty = 1; + RestoreSignals(NULL, &oldMask); + + cbreak(); +@@ -116,9 +118,12 @@ ExtFunc void InitScreens(void) + + ExtFunc void CleanupScreens(void) + { +- RemoveEventGen(&keyGen); +- endwin(); +- OutputTermStr(term_ve, 1); ++ if (screens_dirty) { ++ RemoveEventGen(&keyGen); ++ endwin(); ++ OutputTermStr(term_ve, 1); ++ screens_dirty = 0; ++ } + } + + ExtFunc void GetTermcapInfo(void)