Small fix to build on non-windows platforms.

main
Zed A. Shaw 1 day ago
parent c7607533ce
commit 381b82ee4e
  1. 5
      scratchpad/img2ansi.cpp

@ -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…
Cancel
Save