From 0e4a71b9ced848c652a986ac18426d794122cdd1 Mon Sep 17 00:00:00 2001 From: Kate Date: Sat, 27 Apr 2024 03:16:23 -0500 Subject: [PATCH] Added code to restore the terminal state on crash on curses (#73272) * Added code to restore the terminal state on crash on curses build. * Update src/crash.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * changing the way i am doing this based on suggestion --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/crash.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/crash.cpp b/src/crash.cpp index 7368b1117bd91..305000a317070 100644 --- a/src/crash.cpp +++ b/src/crash.cpp @@ -15,6 +15,10 @@ #include #include +#if !(defined(WIN32) || defined(TILES) || defined(CYGWIN)) +#include +#endif + #if defined(TILES) #include "sdl_wrappers.h" #endif @@ -135,6 +139,9 @@ extern "C" { default: return; } +#if !(defined(WIN32) || defined(TILES)) && !defined(CYGWIN) + endwin(); +#endif if( !isDebuggerActive() ) { log_crash( "Signal", msg ); }