TSAGE: Do not set Surface::pixels directly anymore.

This commit is contained in:
Johannes Schickel 2013-08-03 03:57:39 +02:00
parent eb22417639
commit b7330ea28b

View File

@ -332,12 +332,7 @@ Graphics::Surface GfxSurface::lockSurface() {
// Setup the returned surface either as one pointing to the same pixels as the source, or
// as a subset of the source one based on the currently set bounds
Graphics::Surface result;
result.w = _bounds.width();
result.h = _bounds.height();
result.pitch = src->pitch;
result.format = src->format;
result.pixels = src->getBasePtr(_bounds.left, _bounds.top);
result.init(_bounds.width(), _bounds.height(), src->pitch, src->getBasePtr(_bounds.left, _bounds.top), src->format);
return result;
}