aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/gp32/gp32_osys.cpp
diff options
context:
space:
mode:
authorDavid Corrales2007-06-23 18:51:33 +0000
committerDavid Corrales2007-06-23 18:51:33 +0000
commitcacd7a28fd51d960947de88abbf30c487e66529d (patch)
treef3baa59853bfb307e452b86b9d93c4737b1fa6ab /backends/platform/gp32/gp32_osys.cpp
parent0ac96302fe9c04df79cb01a77d19535b45fe2db0 (diff)
parent90c2210dae8c91fa8babc6b05564e15c9d445d18 (diff)
downloadscummvm-rg350-cacd7a28fd51d960947de88abbf30c487e66529d.tar.gz
scummvm-rg350-cacd7a28fd51d960947de88abbf30c487e66529d.tar.bz2
scummvm-rg350-cacd7a28fd51d960947de88abbf30c487e66529d.zip
Merged the FSNode branch with trunk r27031:27680
svn-id: r27681
Diffstat (limited to 'backends/platform/gp32/gp32_osys.cpp')
-rw-r--r--backends/platform/gp32/gp32_osys.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/backends/platform/gp32/gp32_osys.cpp b/backends/platform/gp32/gp32_osys.cpp
index ab2ac1616b..f6e0a10bbc 100644
--- a/backends/platform/gp32/gp32_osys.cpp
+++ b/backends/platform/gp32/gp32_osys.cpp
@@ -209,14 +209,18 @@ void OSystem_GP32::copyRectToScreen(const byte *src, int pitch, int x, int y, in
}
}
-bool OSystem_GP32::grabRawScreen(Graphics::Surface *surf) {
- assert(surf);
+Graphics::Surface *OSystem_GP32::lockScreen() {
+ _framebuffer.pixels = _gameScreen;
+ _framebuffer.w = _screenWidth;
+ _framebuffer.h = _screenHeight;
+ _framebuffer.pitch = _screenWidth;
+ _framebuffer.bytesPerPixel = 1;
- surf->create(_screenWidth, _screenHeight, 1);
-
- memcpy(surf->pixels, _gameScreen, _screenWidth * _screenHeight);
+ return &_framebuffer;
+}
- return true;
+void OSystem_GP32::unlockScreen() {
+ // The screen is always completely update anyway, so we don't have to force a full update here.
}
//TODO: Implement Dirty rect?
@@ -524,8 +528,10 @@ bool OSystem_GP32::pollEvent(Common::Event &event) {
event.type = Common::EVENT_KEYDOWN;
if (_overlayVisible)
event.kbd.keycode = event.kbd.ascii = 13;
- else
- event.kbd.keycode = event.kbd.ascii = 319;
+ else {
+ event.kbd.keycode = Common::KEYCODE_F5;
+ event.kbd.ascii = Common::ASCII_F5;
+ }
return true;
}
if (ev.button == GPC_VK_SELECT) { // SELECT = pause
@@ -596,8 +602,10 @@ bool OSystem_GP32::pollEvent(Common::Event &event) {
event.type = Common::EVENT_KEYUP;
if (_overlayVisible)
event.kbd.keycode = event.kbd.ascii = 13;
- else
- event.kbd.keycode = event.kbd.ascii = 319;
+ else {
+ event.kbd.keycode = Common::KEYCODE_F5;
+ event.kbd.ascii = Common::ASCII_F5;
+ }
return true;
}
if (ev.button == GPC_VK_SELECT) {