aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2009-01-02 00:50:53 +0000
committerJohannes Schickel2009-01-02 00:50:53 +0000
commit15784edb08c2977ff862551cee38cd6e38896e7d (patch)
treed05b85c0052783d15d5704cfe3779773126e6b3b /engines
parent71001f23c404630ff83acf98062e66ee632fb4d6 (diff)
downloadscummvm-rg350-15784edb08c2977ff862551cee38cd6e38896e7d.tar.gz
scummvm-rg350-15784edb08c2977ff862551cee38cd6e38896e7d.tar.bz2
scummvm-rg350-15784edb08c2977ff862551cee38cd6e38896e7d.zip
Cleanup.
svn-id: r35658
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/video.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp
index 3c26ea4ee7..e2c76f83b7 100644
--- a/engines/gob/video.cpp
+++ b/engines/gob/video.cpp
@@ -557,11 +557,7 @@ void Video::drawOSDText(const char *text) {
uint32 color = 0x2;
Graphics::Surface surf;
- surf.w = g_system->getWidth();
- surf.h = font.getFontHeight();
- surf.pitch = surf.w;
- surf.bytesPerPixel = 1;
- surf.pixels = calloc(surf.w, surf.h);
+ surf.create(g_system->getWidth(), font.getFontHeight(), surf.bytesPerPixel);
font.drawString(&surf, text, 0, 0, surf.w, color, Graphics::kTextAlignCenter);
@@ -569,7 +565,7 @@ void Video::drawOSDText(const char *text) {
g_system->copyRectToScreen((byte *)surf.pixels, surf.pitch, 0, y, surf.w, surf.h);
g_system->updateScreen();
- free(surf.pixels);
+ surf.free();
}
} // End of namespace Gob