]> git.zerfleddert.de Git - micropolis/blobdiff - src/sim/w_x.c
automatically detect byteorder of X server
[micropolis] / src / sim / w_x.c
index 69363b57febcc17ca3b6a3c4d69c203c6cf29cb7..76e9ff6eb6392a87b4f551f7feed35d2d178094e 100644 (file)
@@ -441,7 +441,9 @@ FindXDisplay(Tk_Window tkwin)
        } else {
          fprintf(stderr,
                  "Cool, I found the shared memory extension!\n");
-         xd->shared = 1;
+         fprintf(stderr,
+                 "Disabled SHM, because it is currently broken!\n");
+         xd->shared = 0;
        }
       }
     }
@@ -582,6 +584,8 @@ InitNewView(SimView *view, char *title, int class, int w, int h)
     view->type = X_Mem_View;
   }
 
+  view->x->big_endian = (ImageByteOrder(view->x->dpy) == MSBFirst);
+
   GetPixmaps(view->x);
   view->pixels = view->x->pixels;
 
Impressum, Datenschutz