fix swap
This commit is contained in:
parent
7551212f26
commit
fdd80177ba
|
@ -116,12 +116,16 @@ std::pair<COLORREF, COLORREF> TextAttribute::CalculateRgbColors(const std::array
|
|||
{
|
||||
auto bgIndex = _background.IsDefault() ? 16 : _background.GetIndex();
|
||||
auto fgIndex = _foreground.IsDefault() ? 17 : _foreground.GetIndex();
|
||||
fg = adjustedForegroundColors.value()[bgIndex][fgIndex];
|
||||
if (IsReverseVideo() ^ reverseScreenMode)
|
||||
{
|
||||
std::swap(fg, bg);
|
||||
bg = _foreground.GetColor(colorTable, defaultFgColor);
|
||||
fg = adjustedForegroundColors.value()[fgIndex][bgIndex];
|
||||
reversed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
fg = adjustedForegroundColors.value()[bgIndex][fgIndex];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue