]> source.dussan.org Git - tigervnc.git/commitdiff
Check endianness when constructing PlatformPixelBuffer()
authorJan Grulich <jgrulich@redhat.com>
Wed, 8 Aug 2018 13:29:23 +0000 (15:29 +0200)
committerJan Grulich <jgrulich@redhat.com>
Wed, 8 Aug 2018 13:29:23 +0000 (15:29 +0200)
vncviewer/PlatformPixelBuffer.cxx

index a2b506df242cd7eaa0a91f5f9e838c1324597699..b5c94d57711b3ad198eae3f6705b886efbbdbd73 100644 (file)
@@ -34,8 +34,8 @@
 static rfb::LogWriter vlog("PlatformPixelBuffer");
 
 PlatformPixelBuffer::PlatformPixelBuffer(int width, int height) :
-  FullFramePixelBuffer(rfb::PixelFormat(32, 24, false, true,
-                                       255, 255, 255, 16, 8, 0),
+  FullFramePixelBuffer(rfb::PixelFormat(32, 24, ImageByteOrder(fl_display) == MSBFirst,
+                                        true, 255, 255, 255, 16, 8, 0),
                        width, height, 0, stride),
   Surface(width, height)
 #if !defined(WIN32) && !defined(__APPLE__)