Restore terminal state on termination
This commit is contained in:
10
src/tui.cpp
10
src/tui.cpp
@ -63,6 +63,11 @@ void TUI::initTUI()
|
||||
|
||||
void TUI::updateTUI(list<Drive> *plistDrives, uint8_t u8SelectedEntry)
|
||||
{
|
||||
if (isendwin())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mxUIrefresh.lock();
|
||||
uint16_t u16StdscrX, u16StdscrY;
|
||||
getmaxyx(stdscr, u16StdscrY, u16StdscrX);
|
||||
@ -250,6 +255,11 @@ enum TUI::UserInput TUI::readUserInput()
|
||||
return TUI::UserInput::Undefined;
|
||||
}
|
||||
|
||||
void TUI::terminateTUI()
|
||||
{
|
||||
endwin();
|
||||
}
|
||||
|
||||
void TUI::centerTitle(WINDOW *pwin, const char *title)
|
||||
{
|
||||
int x, maxX, stringSize;
|
||||
|
||||
Reference in New Issue
Block a user