diff options
author | Joost Peters | 2006-05-30 16:19:56 +0000 |
---|---|---|
committer | Joost Peters | 2006-05-30 16:19:56 +0000 |
commit | 0612e74116754184689689df7835362464611cc0 (patch) | |
tree | b845790d9c713b946977a9f086854e1dd6966b73 /backends | |
parent | 411264238ab44ea5e619368137e42ca65d467a45 (diff) | |
download | scummvm-rg350-0612e74116754184689689df7835362464611cc0.tar.gz scummvm-rg350-0612e74116754184689689df7835362464611cc0.tar.bz2 scummvm-rg350-0612e74116754184689689df7835362464611cc0.zip |
- fix bug in copyRectToOverlay() that was introduced after _overlayScale cleanup.
- implement grabOverlay()
svn-id: r22772
Diffstat (limited to 'backends')
-rw-r--r-- | backends/psp/osys_psp.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/backends/psp/osys_psp.cpp b/backends/psp/osys_psp.cpp index 9db5e10b5d..1d5712e226 100644 --- a/backends/psp/osys_psp.cpp +++ b/backends/psp/osys_psp.cpp @@ -247,6 +247,14 @@ void OSystem_PSP::clearOverlay() { } void OSystem_PSP::grabOverlay(OverlayColor *buf, int pitch) { + int h = _overlayHeight; + OverlayColor *src = _overlayBuffer; + + do { + memcpy(buf, src, _overlayWidth * sizeof(OverlayColor)); + src += _overlayWidth; + buf += pitch; + } while (--h); } void OSystem_PSP::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { @@ -278,7 +286,7 @@ void OSystem_PSP::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, i OverlayColor *dst = _overlayBuffer + (y * _overlayWidth + x); - if (_screenWidth == pitch && pitch == w) { + if (_overlayWidth == pitch && pitch == w) { memcpy(dst, buf, h * w * sizeof(OverlayColor)); } else { do { |