Skip to content

Commit

Permalink
Screen.h:
Browse files Browse the repository at this point in the history
* Oops. I accidentally "duplicated" the save_terminal_colors() function when I pasted in some fixes for it before.
  • Loading branch information
razterizer committed Oct 14, 2024
1 parent 7f488f0 commit cb38621
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions Screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,25 +190,6 @@ void resize_terminal_window(int nr, int nc)
#endif
}

// Function to save current console fg and bg colors.
void save_terminal_colors()
{
#if _WIN32
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);

CONSOLE_SCREEN_BUFFER_INFO consoleInfo;
if (GetConsoleScreenBufferInfo(hConsole, &consoleInfo))
{
savedAttributes = consoleInfo.wAttributes;
int bkg_color = static_cast<int>(savedAttributes & 0xF0);
bkg_color = bkg_color >> 4;
orig_bkg_color = color::get_color_win(bkg_color);
}
else
std::cerr << "Error: Unable to get console screen buffer info." << std::endl;
#endif
}

// Function to save current console fg and bg colors.
void save_terminal_colors()
{
Expand Down

0 comments on commit cb38621

Please sign in to comment.