aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/PalmOS
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/PalmOS')
-rw-r--r--backends/platform/PalmOS/Src/be_os5.h5
-rw-r--r--backends/platform/PalmOS/Src/os5_gfx.cpp17
2 files changed, 15 insertions, 7 deletions
diff --git a/backends/platform/PalmOS/Src/be_os5.h b/backends/platform/PalmOS/Src/be_os5.h
index 13e8b4ff20..bb38c51ca6 100644
--- a/backends/platform/PalmOS/Src/be_os5.h
+++ b/backends/platform/PalmOS/Src/be_os5.h
@@ -110,6 +110,8 @@ private:
typedef void (OSystem_PalmOS5::*RendererProc)(RectangleType &r, PointType &p);
RendererProc _render;
+ Graphics::Surface _framebuffer;
+
OverlayColor *_overlayP;
WinHandle _overlayH, _workScreenH;
int16 *_workScreenP;
@@ -168,7 +170,8 @@ public:
void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h);
void clearScreen();
- bool grabRawScreen(Graphics::Surface *surf);
+ virtual Graphics::Surface *lockScreen();
+ virtual void unlockScreen();
void setCursorPalette(const byte *colors, uint start, uint num);
void disableCursorPalette(bool disable);
diff --git a/backends/platform/PalmOS/Src/os5_gfx.cpp b/backends/platform/PalmOS/Src/os5_gfx.cpp
index cff9e79abe..be5d28bc56 100644
--- a/backends/platform/PalmOS/Src/os5_gfx.cpp
+++ b/backends/platform/PalmOS/Src/os5_gfx.cpp
@@ -219,13 +219,18 @@ void OSystem_PalmOS5::copyRectToScreen(const byte *buf, int pitch, int x, int y,
}
}
-bool OSystem_PalmOS5::grabRawScreen(Graphics::Surface *surf) {
- assert(surf);
+Graphics::Surface *OSystem_PalmOS5::lockScreen() {
+ _framebuffer.pixels = _offScreenP;
+ _framebuffer.w = _screenWidth;
+ _framebuffer.h = _screenHeight;
+ _framebuffer.pitch = _screenWidth;
+ _framebuffer.bytesPerPixel = 1;
+
+ return &_framebuffer;
+}
- surf->create(_screenWidth, _screenHeight, 1);
- MemMove(surf->pixels, _offScreenP, _screenWidth * _screenHeight);
-
- return true;
+void OSystem_PalmOS5::unlockScreen() {
+ // The screen is always completely update anyway, so we don't have to force a full update here.
}
void OSystem_PalmOS5::int_updateScreen() {