Small fix to build on non-windows platforms.
This commit is contained in:
parent
c7607533ce
commit
381b82ee4e
1 changed files with 6 additions and 1 deletions
|
@ -11,7 +11,9 @@
|
|||
#include <ftxui/screen/terminal.hpp>
|
||||
#include <iostream>
|
||||
#include <fcntl.h>
|
||||
#if defined(_WIN64) || defined(_WIN32)
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <vector>
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
@ -67,7 +69,10 @@ HSVColor rgb_to_hsv(sf::Color rgb) {
|
|||
int main(int argc, char *argv[]) {
|
||||
ftxui::Terminal::SetColorSupport(ftxui::Terminal::Color::TrueColor);
|
||||
|
||||
#if defined(_WIN64) || defined(_WIN32)
|
||||
_setmode(_fileno(stdout), _O_U16TEXT);
|
||||
#endif
|
||||
|
||||
dbc::check(argc == 2, "USAGE: img2ansi <image_file>");
|
||||
|
||||
string image_file(argv[1]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue