Skip to content

Commit

Permalink
Fix configuration file location display getting bold + hide cursor wh…
Browse files Browse the repository at this point in the history
…ile running
  • Loading branch information
ruby-R53 authored and drfiemost committed Jul 8, 2024
1 parent 99d29c9 commit f7280ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,12 @@ void ConsolePlayer::menu ()
cerr << '\x1b' << "[40m"; // Background black
cerr << '\x1b' << "[2J"; // Clear screen
cerr << '\x1b' << "[0;0H"; // Move cursor to 0,0
cerr << '\x1b' << "[?25l"; // and hide it
}

if (m_verboseLevel > 1)
{
cerr << '\x1b' << "[0m";
cerr << "Config loaded from" << endl;
SID_CERR << m_iniCfg.getFilename() << endl;
}
Expand Down Expand Up @@ -681,6 +683,8 @@ void ConsolePlayer::consoleTable (player_table_t table)
// Restore Ansi Console to defaults
void ConsolePlayer::consoleRestore ()
{
if ((m_iniCfg.console ()).ansi)
if ((m_iniCfg.console ()).ansi) {
cerr << '\x1b' << "[?25h";
cerr << '\x1b' << "[0m";
}
}
4 changes: 3 additions & 1 deletion src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,10 @@ void ConsolePlayer::close ()
if (m_quietLevel < 2)
{ // Correctly leave ansi mode and get prompt to
// end up in a suitable location
if ((m_iniCfg.console ()).ansi)
if ((m_iniCfg.console ()).ansi) {
cerr << '\x1b' << "[?25h";
cerr << '\x1b' << "[0m";
}
#ifndef _WIN32
cerr << endl;
#endif
Expand Down

0 comments on commit f7280ac

Please sign in to comment.