From 57b992717b5234fa1878567c8ff8907964f1abde Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Fri, 31 Dec 2021 01:22:45 +0100 Subject: Codechange: Extend DrawSpriteToRgbaBuffer to work with 8bpp blitters. --- src/video/cocoa/cocoa_wnd.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video') 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 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 data(CGDataProviderCreateWithData(nullptr, buffer.release(), dim.width * dim.height * 4, &CGDataFreeCallback)); if (!data) return nullptr; -- cgit v1.2.3-70-g09d2