mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-23 22:22:05 +08:00
Fix #1876
This commit is contained in:
parent
1305663d99
commit
37d76b961c
@ -134,7 +134,7 @@ std::uint16_t SPDLOG_INLINE wincolor_sink<ConsoleMutex>::set_foreground_color_(s
|
||||
|
||||
// change only the foreground bits (lowest 4 bits)
|
||||
auto new_attribs = static_cast<WORD>(attribs) | (orig_buffer_info.wAttributes & 0xfff0);
|
||||
auto ignored = ::SetConsoleTextAttribute(static_cast<HANDLE>(out_handle_), new_attribs);
|
||||
auto ignored = ::SetConsoleTextAttribute(static_cast<HANDLE>(out_handle_), static_cast<WORD>(new_attribs));
|
||||
(void)(ignored);
|
||||
return static_cast<std::uint16_t>(orig_buffer_info.wAttributes); // return orig attribs
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user