Commit 0e9287e3 authored by Cyril Deguet's avatar Cyril Deguet

* x11/x11_display.cpp: only 8 bpp mode was working...

parent a42c3ab3
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* x11_display.cpp * x11_display.cpp
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: x11_display.cpp,v 1.3 2004/01/25 18:41:08 asmax Exp $ * $Id: x11_display.cpp,v 1.4 2004/01/25 18:46:37 asmax Exp $
* *
* Authors: Cyril Deguet <asmax@via.ecp.fr> * Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr> * Olivier Teulire <ipkiss@via.ecp.fr>
...@@ -367,7 +367,14 @@ unsigned long X11Display::getPixelValue( uint8_t r, uint8_t g, uint8_t b ) const ...@@ -367,7 +367,14 @@ unsigned long X11Display::getPixelValue( uint8_t r, uint8_t g, uint8_t b ) const
value = ( ((uint32_t)r >> m_redRightShift) << m_redLeftShift ) | value = ( ((uint32_t)r >> m_redRightShift) << m_redLeftShift ) |
( ((uint32_t)g >> m_greenRightShift) << m_greenLeftShift ) | ( ((uint32_t)g >> m_greenRightShift) << m_greenLeftShift ) |
( ((uint32_t)b >> m_blueRightShift) << m_blueLeftShift ); ( ((uint32_t)b >> m_blueRightShift) << m_blueLeftShift );
if( m_pixelSize == 1 )
{
return 255 - value; return 255 - value;
}
else
{
return value;
}
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment