diff options
author | Johannes Schickel | 2011-04-17 16:23:15 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-04-17 16:24:37 +0200 |
commit | 7ac3ae108a69587693e0820cde43a63c34a186ec (patch) | |
tree | c3004c8f20548e63bacc813f0a55bdca2b39d4aa /backends/vkeybd | |
parent | 4fd3e3d6fe72b6b978fbc5e9e0b5218741d15c83 (diff) | |
download | scummvm-rg350-7ac3ae108a69587693e0820cde43a63c34a186ec.tar.gz scummvm-rg350-7ac3ae108a69587693e0820cde43a63c34a186ec.tar.bz2 scummvm-rg350-7ac3ae108a69587693e0820cde43a63c34a186ec.zip |
BACKEND: Prefer Surface::create taking a PixelFormat over the one taking a byte depth.
Diffstat (limited to 'backends/vkeybd')
-rw-r--r-- | backends/vkeybd/virtual-keyboard-gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/backends/vkeybd/virtual-keyboard-gui.cpp b/backends/vkeybd/virtual-keyboard-gui.cpp index 050ab5c5a2..4670ea5006 100644 --- a/backends/vkeybd/virtual-keyboard-gui.cpp +++ b/backends/vkeybd/virtual-keyboard-gui.cpp @@ -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); |