未验证 提交 0c71a9c3 编写于 作者: J Jim 提交者: GitHub

Merge pull request #2895 from jpark37/mac-resize

mac-capture: Use resize instead of reserve
......@@ -51,7 +51,7 @@ static inline void capture_frame(struct window_capture *wc)
size_t height = CGImageGetHeight(img);
CGRect rect = {{0, 0}, {width, height}};
da_reserve(wc->buffer, width * height * 4);
da_resize(wc->buffer, width * height * 4);
uint8_t *data = wc->buffer.array;
CGContextRef cg_context = CGBitmapContextCreate(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册