IMAGE: Fix taking screenshots on big endian systems
This commit is contained in:
parent
8ae17b481a
commit
205df5dbdf
4 changed files with 18 additions and 1 deletions
|
@ -1214,7 +1214,11 @@ bool OpenGLGraphicsManager::saveScreenshot(const Common::String &filename) const
|
|||
pixels.resize(lineSize * height);
|
||||
GL_CALL(glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, &pixels.front()));
|
||||
|
||||
#ifdef SCUMM_LITTLE_ENDIAN
|
||||
const Graphics::PixelFormat format(3, 8, 8, 8, 0, 0, 8, 16, 0);
|
||||
#else
|
||||
const Graphics::PixelFormat format(3, 8, 8, 8, 0, 16, 8, 0, 0);
|
||||
#endif
|
||||
Graphics::Surface data;
|
||||
data.init(width, height, lineSize, &pixels.front(), format);
|
||||
#ifdef USE_PNG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue