Skip to content

Commit

Permalink
Fix reverse color on windows + jna
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed May 3, 2017
1 parent e49862a commit 365bd32
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ private void applyAttribute() throws IOException {
private short invertAttributeColors(short attributes) {
// Swap the the Foreground and Background bits.
int fg = 0x000F & attributes;
fg <<= 8;
int bg = 0X00F0 * attributes;
bg >>=8;
fg <<= 4;
int bg = 0X00F0 & attributes;
bg >>= 4;
attributes = (short) ((attributes & 0xFF00) | fg | bg);
return attributes;
}
Expand Down

0 comments on commit 365bd32

Please sign in to comment.