@@ -68,7 +68,7 @@ static void *qoiMalloc(const size_t sz) {
6868 assert (lastSz == sz && " assuming constant width, height and depth of qoi images" );
6969 return qoiBuffer;
7070}
71- #include " ../contrib/qoi/ qoi.h"
71+ #include " qoi.h"
7272
7373template <typename T>
7474static void applyFlag (int &flag,T val,bool v) {
@@ -635,6 +635,7 @@ void ImZeroClient::App::setup(ImZeroCliOptions &opts) {
635635 fFffiOutFile = stdout;
636636 // setup skia/imgui shared objects
637637 if (opts.fFffiInterpreter ) {
638+ #if defined(linux) || defined(__linux) || defined(__linux__)
638639 if (opts.fFffiInFile != nullptr ) {
639640 fFffiInFile = fopen (opts.fFffiInFile , " rw" );
640641 if (fFffiInFile == nullptr ) {
@@ -651,6 +652,9 @@ void ImZeroClient::App::setup(ImZeroCliOptions &opts) {
651652 }
652653 setvbuf (fFffiOutFile , nullptr , _IONBF, 0 );
653654 }
655+ #else
656+ // FIXME TODO
657+ #endif
654658 }
655659 }
656660 fFffiInterpreter = opts.fFffiInterpreter ;
@@ -711,7 +715,11 @@ int ImZeroClient::App::mainLoopHeadless(const ImZeroCliOptions &opts, ImVec4 con
711715
712716 if (opts.fVideoUserInteractionEventsFile != nullptr && opts.fVideoUserInteractionEventsFile [0 ] != ' \0 ' ) {
713717 // RDWR: having at least one writer will prevent SIG_PIPE
718+ #if defined(linux) || defined(__linux) || defined(__linux__)
714719 fUserInteractionFd = open (opts.fVideoUserInteractionEventsFile , O_RDWR | O_NONBLOCK);
720+ #else
721+ // FIXME TODO
722+ #endif
715723 if (fUserInteractionFd == -1 ) {
716724 fprintf (stderr, " unable to open user interaction events in file %s: %s\n " , opts.fVideoUserInteractionEventsFile , strerror (errno));
717725 return 1 ;
@@ -1062,7 +1070,11 @@ void ImZeroClient::App::videoPaint(SkCanvas* canvas, int width, int height) { Zo
10621070}
10631071ImZeroClient::App::~App () {
10641072 if (fDispatchInteractionEvents ) {
1073+ #if defined(linux) || defined(__linux) || defined(__linux__)
10651074 close (fUserInteractionFd );
1075+ #else
1076+ // FIXME TODO
1077+ #endif
10661078 fDispatchInteractionEvents = false ;
10671079 }
10681080}
@@ -1113,10 +1125,15 @@ void ImZeroClient::App::dispatchUserInteractionEventsBinary() {
11131125 break ;
11141126 case 1 : // read message length
11151127 {
1128+ #if defined(linux) || defined(__linux) || defined(__linux__)
11161129 auto r = read (fUserInteractionFd ,p,bytesToRead);
11171130 if (r <= 0 ) {
11181131 return ;
11191132 }
1133+ #else
1134+ // FIXME TODO
1135+ int r = 0 ;
1136+ #endif
11201137 bytesToRead -= r;
11211138 p += r;
11221139 if (bytesToRead == 0 ) {
@@ -1133,7 +1150,12 @@ void ImZeroClient::App::dispatchUserInteractionEventsBinary() {
11331150 break ;
11341151 case 2 : // read message
11351152 {
1153+ #if defined(linux) || defined(__linux) || defined(__linux__)
11361154 auto r = read (fUserInteractionFd ,p,bytesToRead);
1155+ #else
1156+ // FIXME TODO
1157+ int r = 0 ;
1158+ #endif
11371159 bytesToRead -= r;
11381160 p += r;
11391161 if (bytesToRead == 0 ) {
@@ -1325,7 +1347,12 @@ void ImZeroClient::App::dispatchUserInteractionEventsFB() {
13251347 break ;
13261348 case 1 : // read flatbuffers message length
13271349 {
1350+ #if defined(linux) || defined(__linux) || defined(__linux__)
13281351 auto r = read (fUserInteractionFd ,p,bytesToRead);
1352+ #else
1353+ // FIXME TODO
1354+ int r = 0 ;
1355+ #endif
13291356 if (r <= 0 ) {
13301357 return ;
13311358 }
@@ -1346,7 +1373,12 @@ void ImZeroClient::App::dispatchUserInteractionEventsFB() {
13461373 case 2 : // read flatbuffers message
13471374 {
13481375 // fprintf(stderr, "reading message of size %d\n", (int)bytesToRead);
1376+ #if defined(linux) || defined(__linux) || defined(__linux__)
13491377 auto r = read (fUserInteractionFd ,p,bytesToRead);
1378+ #else
1379+ // FIXME TODO
1380+ int r = 0 ;
1381+ #endif
13501382 bytesToRead -= r;
13511383 p += r;
13521384 if (bytesToRead == 0 ) {
@@ -1490,4 +1522,4 @@ ImZeroClient::App::App() {
14901522 fPreviousTime = 0.0 ;
14911523 fOutputFormat = kRawFrameOutputFormat_None ;
14921524 fUserInteractionFd = 0 ;
1493- }
1525+ }
0 commit comments