diff options
author | David Corrales | 2007-06-23 18:51:33 +0000 |
---|---|---|
committer | David Corrales | 2007-06-23 18:51:33 +0000 |
commit | cacd7a28fd51d960947de88abbf30c487e66529d (patch) | |
tree | f3baa59853bfb307e452b86b9d93c4737b1fa6ab /backends/platform/gp32 | |
parent | 0ac96302fe9c04df79cb01a77d19535b45fe2db0 (diff) | |
parent | 90c2210dae8c91fa8babc6b05564e15c9d445d18 (diff) | |
download | scummvm-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')
-rw-r--r-- | backends/platform/gp32/gp32_osys.cpp | 28 | ||||
-rw-r--r-- | backends/platform/gp32/gp32_osys.h | 5 |
2 files changed, 22 insertions, 11 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) { diff --git a/backends/platform/gp32/gp32_osys.h b/backends/platform/gp32/gp32_osys.h index fa8a0903ad..94578e8e15 100644 --- a/backends/platform/gp32/gp32_osys.h +++ b/backends/platform/gp32/gp32_osys.h @@ -49,6 +49,8 @@ protected: uint16 *_tmpScreen, *_hwScreen; OverlayColor *_overlayBuffer; + Graphics::Surface _framebuffer; + int _overlayWidth, _overlayHeight; bool _overlayVisible; uint32 _shakePos; @@ -111,7 +113,8 @@ public: void grabOverlay(OverlayColor *buf, int pitch); void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); - bool grabRawScreen(Graphics::Surface *surf); + virtual Graphics::Surface *lockScreen(); + virtual void unlockScreen(); int16 getOverlayHeight(); int16 getOverlayWidth(); |