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/dc/display.cpp | |
| 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/dc/display.cpp')
| -rw-r--r-- | backends/platform/dc/display.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp index 73312cafed..da9f6e83ff 100644 --- a/backends/platform/dc/display.cpp +++ b/backends/platform/dc/display.cpp @@ -609,19 +609,24 @@ int OSystem_Dreamcast::getGraphicsMode() const return 0; } -bool OSystem_Dreamcast::grabRawScreen(Graphics::Surface *surf) +Graphics::Surface *OSystem_Dreamcast::lockScreen() { - if(!screen || !surf) - return false; + if (!screen) + return 0; - surf->create(_screen_w, _screen_h, 1); - unsigned char *src = screen, *dst = (unsigned char *)surf->pixels; - for(int h = _screen_h; h>0; --h) { - memcpy(dst, src, _screen_w); - src += SCREEN_W; - dst += _screen_w; - } - return true; + _framebuffer.pixels = screen; + _framebuffer.w = _screen_w; + _framebuffer.h = _screen_h; + _framebuffer.pitch = SCREEN_W; + _framebuffer.bytesPerPixel = 1; + + return &_framebuffer; +} + +void OSystem_Dreamcast::unlockScreen() +{ + // Force screen update + _screen_dirty = true; } void OSystem_Dreamcast::clearScreen() |
