Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix configuration file location display getting bold + hide cursor while running #38

Merged
merged 11 commits into from
Jul 8, 2024
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
Loading