summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-12-31 01:22:45 +0100
committerMichael Lutz <michi@icosahedron.de>2022-01-01 12:19:30 +0100
commit57b992717b5234fa1878567c8ff8907964f1abde (patch)
treecbb21a103c5810ca49b954240c68a856d307f7e2 /src/video
parent69c8ed9965e2b2bfd6bc04627ca07f78dbcbe2ba (diff)
downloadopenttd-57b992717b5234fa1878567c8ff8907964f1abde.tar.xz
Codechange: Extend DrawSpriteToRgbaBuffer to work with 8bpp blitters.
Diffstat (limited to 'src/video')
-rw-r--r--src/video/cocoa/cocoa_wnd.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video/cocoa/cocoa_wnd.mm b/src/video/cocoa/cocoa_wnd.mm
index 95ac3feb1..1876ee27f 100644
--- a/src/video/cocoa/cocoa_wnd.mm
+++ b/src/video/cocoa/cocoa_wnd.mm
@@ -179,7 +179,7 @@ static NSImage *NSImageFromSprite(SpriteID sprite_id, ZoomLevel zoom)
/* Fetch the sprite and create a new bitmap */
Dimension dim = GetSpriteSize(sprite_id, nullptr, zoom);
std::unique_ptr<uint32[]> buffer = DrawSpriteToRgbaBuffer(sprite_id, zoom);
- if (!buffer) return nullptr; // failed to blit sprite or we're using an 8bpp blitter.
+ if (!buffer) return nullptr; // Failed to blit sprite for some reason.
CFAutoRelease<CGDataProvider> data(CGDataProviderCreateWithData(nullptr, buffer.release(), dim.width * dim.height * 4, &CGDataFreeCallback));
if (!data) return nullptr;