diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index 1e0236cae41..ebda4450190 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -26,6 +26,7 @@ #include "common/stdafx.h" #include "common/scummsys.h" +#include "graphics/surface.h" #include "common/rect.h" #include "osys_psp.h" @@ -186,6 +187,15 @@ void OSystem_PSP::copyRectToScreen(const byte *buf, int pitch, int x, int y, int } } +bool OSystem_PSP::grabRawScreen(Graphics::Surface *surf) { + assert(surf); + + surf->create(_screenWidth, _screenHeight, 1); + memcpy(surf->pixels, _offscreen, _screenWidth * _screenHeight); + + return true; +} + void OSystem_PSP::updateScreen() { unsigned short *temp; diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h index 937a6e1889d..df5c69d232d 100644 --- a/backends/platform/psp/osys_psp.h +++ b/backends/platform/psp/osys_psp.h @@ -37,6 +37,11 @@ enum GraphicModeID { CENTERED_362X272 }; +namespace Graphics { + struct Surface; +} + + class OSystem_PSP : public OSystem { public: static const OSystem::GraphicsMode s_supportedGraphicsModes[]; @@ -86,6 +91,7 @@ public: virtual int16 getHeight(); virtual void setPalette(const byte *colors, uint start, uint num); virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); + virtual bool grabRawScreen(Graphics::Surface *surf); virtual void updateScreen(); virtual void setShakePos(int shakeOffset);