Replace lock/unlock/lock/unlock by lock/unlock for efficency

svn-id: r30693
This commit is contained in:
Max Horn 2008-01-28 22:20:55 +00:00
parent d8e1f5a060
commit 0150ada2d7

View file

@ -350,12 +350,10 @@ void Gfx::updateScreen() {
Graphics::Surface *surf = g_system->lockScreen();
drawGfxObjects(*surf);
g_system->unlockScreen();
if (_halfbrite) {
// FIXME: the implementation of halfbrite is now largely sub-optimal in that a full screen
// rewrite is needed to apply the effect.
surf = g_system->lockScreen();
byte *src = (byte*)_buffers[kBit2]->pixels;
byte *dst = (byte*)surf->pixels;
for (int i = 0; i < surf->w*surf->h; i++) {
@ -364,9 +362,10 @@ void Gfx::updateScreen() {
if (_hbCircleRadius > 0) {
drawCircle(_hbCirclePos.x, _hbCirclePos.y, _hbCircleRadius, 0, &halfbritePixel, surf->pixels);
}
g_system->unlockScreen();
}
g_system->unlockScreen();
drawInventory();
drawItems();