aboutsummaryrefslogtreecommitdiff
path: root/src/client/tile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/tile.cpp')
-rw-r--r--src/client/tile.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client/tile.cpp b/src/client/tile.cpp
index f2639757e..7e3901247 100644
--- a/src/client/tile.cpp
+++ b/src/client/tile.cpp
@@ -837,17 +837,16 @@ static video::IImage *createInventoryCubeImage(
image = scaled;
}
sanity_check(image->getPitch() == 4 * size);
- return reinterpret_cast<u32 *>(image->lock());
+ return reinterpret_cast<u32 *>(image->getData());
};
auto free_image = [] (video::IImage *image) -> void {
- image->unlock();
image->drop();
};
video::IImage *result = driver->createImage(video::ECF_A8R8G8B8, {cube_size, cube_size});
sanity_check(result->getPitch() == 4 * cube_size);
result->fill(video::SColor(0x00000000u));
- u32 *target = reinterpret_cast<u32 *>(result->lock());
+ u32 *target = reinterpret_cast<u32 *>(result->getData());
// Draws single cube face
// `shade_factor` is face brightness, in range [0.0, 1.0]
@@ -906,7 +905,6 @@ static video::IImage *createInventoryCubeImage(
{0, 5}, {1, 5},
});
- result->unlock();
return result;
}