aboutsummaryrefslogtreecommitdiff
path: root/backends/vkeybd
diff options
context:
space:
mode:
authorJohannes Schickel2011-05-01 16:54:45 +0200
committerJohannes Schickel2011-05-01 16:54:45 +0200
commit71bdb86e028db9556611f88b3686ce93312a8131 (patch)
tree3c24233044a8e72bd8ecd73b981f50c725d5d282 /backends/vkeybd
parent89b63e3adb4692c9659f8b133727ccc1e2af75b4 (diff)
parent8ff527ac4ef4237e63c0802a22eb0f942089e6c4 (diff)
downloadscummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.tar.gz
scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.tar.bz2
scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.zip
Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here: https://github.com/scummvm/scummvm/pull/16 Conflicts: graphics/png.cpp
Diffstat (limited to 'backends/vkeybd')
-rw-r--r--backends/vkeybd/virtual-keyboard-gui.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/backends/vkeybd/virtual-keyboard-gui.cpp b/backends/vkeybd/virtual-keyboard-gui.cpp
index 050ab5c5a2..9ffda6e3a7 100644
--- a/backends/vkeybd/virtual-keyboard-gui.cpp
+++ b/backends/vkeybd/virtual-keyboard-gui.cpp
@@ -36,7 +36,7 @@
namespace Common {
static void blit(Graphics::Surface *surf_dst, Graphics::Surface *surf_src, int16 x, int16 y, OverlayColor transparent) {
- if (surf_dst->bytesPerPixel != sizeof(OverlayColor) || surf_src->bytesPerPixel != sizeof(OverlayColor))
+ if (surf_dst->format.bytesPerPixel != sizeof(OverlayColor) || surf_src->format.bytesPerPixel != sizeof(OverlayColor))
return;
const OverlayColor *src = (const OverlayColor *)surf_src->pixels;
@@ -133,7 +133,7 @@ void VirtualKeyboardGUI::setupDisplayArea(Rect& r, OverlayColor forecolor) {
_dispI = 0;
_dispForeColor = forecolor;
_dispBackColor = _dispForeColor + 0xFF;
- _dispSurface.create(r.width(), _dispFont->getFontHeight(), sizeof(OverlayColor));
+ _dispSurface.create(r.width(), _dispFont->getFontHeight(), _system->getOverlayFormat());
_dispSurface.fillRect(Rect(_dispSurface.w, _dispSurface.h), _dispBackColor);
_displayEnabled = true;
}
@@ -163,7 +163,7 @@ void VirtualKeyboardGUI::run() {
_system->showOverlay();
_system->clearOverlay();
}
- _overlayBackup.create(_screenW, _screenH, sizeof(OverlayColor));
+ _overlayBackup.create(_screenW, _screenH, _system->getOverlayFormat());
_system->grabOverlay((OverlayColor*)_overlayBackup.pixels, _overlayBackup.w);
setupCursor();
@@ -265,7 +265,7 @@ void VirtualKeyboardGUI::screenChanged() {
_screenW = newScreenW;
_screenH = newScreenH;
- _overlayBackup.create(_screenW, _screenH, sizeof(OverlayColor));
+ _overlayBackup.create(_screenW, _screenH, _system->getOverlayFormat());
_system->grabOverlay((OverlayColor*)_overlayBackup.pixels, _overlayBackup.w);
if (!_kbd->checkModeResolutions()) {
@@ -358,7 +358,7 @@ void VirtualKeyboardGUI::redraw() {
if (w <= 0 || h <= 0) return;
Graphics::Surface surf;
- surf.create(w, h, sizeof(OverlayColor));
+ surf.create(w, h, _system->getOverlayFormat());
OverlayColor *dst = (OverlayColor *)surf.pixels;
const OverlayColor *src = (OverlayColor *) _overlayBackup.getBasePtr(_dirtyRect.left, _dirtyRect.top);