diff options
author | John Willis | 2007-02-07 22:33:06 +0000 |
---|---|---|
committer | John Willis | 2007-02-07 22:33:06 +0000 |
commit | b69562824866e86245209fc9448a38b6c18dab39 (patch) | |
tree | f59c030848e71b6ecadbbb84bac43b348456985c /backends | |
parent | 98bd5a668075509205c9d67d676e1f8bc13a9d4b (diff) | |
download | scummvm-rg350-b69562824866e86245209fc9448a38b6c18dab39.tar.gz scummvm-rg350-b69562824866e86245209fc9448a38b6c18dab39.tar.bz2 scummvm-rg350-b69562824866e86245209fc9448a38b6c18dab39.zip |
Update GP2X port to hack around the odd grabRawScreen issues. This is not a fix rather a workaround for now.
svn-id: r25420
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/gp2x/graphics.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/backends/platform/gp2x/graphics.cpp b/backends/platform/gp2x/graphics.cpp index 64f31f10e4..01a79e154c 100644 --- a/backends/platform/gp2x/graphics.cpp +++ b/backends/platform/gp2x/graphics.cpp @@ -771,22 +771,13 @@ void OSystem_GP2X::copyRectToScreen(const byte *src, int pitch, int x, int y, in SDL_UnlockSurface(_screen); } +// TIDY: DIRTY HACK: Try a REALLY simple version of grabRawScreen to +// debug why it will not work on the GP2X. bool OSystem_GP2X::grabRawScreen(Graphics::Surface *surf) { - assert(_screen); assert(surf); - Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends - - surf->create(_screenWidth, _screenHeight, _screen->format->BytesPerPixel); - - // Try to lock the screen surface - if (SDL_LockSurface(_screen) == -1) - error("SDL_LockSurface failed: %s", SDL_GetError()); - - memcpy(surf->pixels, _screen->pixels, _screenWidth * _screenHeight * _screen->format->BytesPerPixel); - - // Unlock the screen surface - SDL_UnlockSurface(_screen); + surf->create(_screenWidth, _screenHeight, 1); + memcpy(surf->pixels, _screen->pixels, _screenWidth * _screenHeight); return true; } |