-// int32 * vs = (int32 *)surface->lock();
- if (SDL_MUSTLOCK(surface))
- while (SDL_LockSurface(surface) < 0)
- SDL_Delay(10);
-// uint8 * vs = (Uint8 *)surface->pixels;
-// memcpy(vs, backbuffer, tom_width * tom_height * 2);
- memcpy(surface->pixels, backbuffer, tom_width * tom_height * 2);
-// surface->unlock();
- if (SDL_MUSTLOCK(surface))
- SDL_UnlockSurface(surface);
-// surface->copy(console);
- SDL_Rect srcrect, dstrect;
- srcrect.x = srcrect.y = 0, srcrect.w = surface->w, srcrect.h = surface->h;
- dstrect.x = dstrect.y = 0, dstrect.w = surface->w, dstrect.h = surface->h;
-// SDL_LowerBlit(surface, &srcrect, dst.surface, &dstrect);
- SDL_BlitSurface(surface, &srcrect, mainSurface, &dstrect);
-// dst.updates[dst.nupdates++] = dstrect;
-// console.update();
- SDL_Flip(mainSurface);
-// nupdates = 0;
-