mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 17:29:11 +00:00
Cleanup.
svn-id: r35658
This commit is contained in:
parent
71001f23c4
commit
15784edb08
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user