1
0
Эх сурвалжийг харах

Use bzalloc instead of bmalloc+memset

Palana 11 жил өмнө
parent
commit
c2abb80c9a

+ 1 - 2
libobs-opengl/gl-cocoa.m

@@ -217,8 +217,7 @@ void gl_getclientsize(struct gs_swap_chain *swap, uint32_t *width,
 texture_t texture_create_from_iosurface(device_t device, void *iosurf)
 {
 	IOSurfaceRef ref = (IOSurfaceRef)iosurf;
-	struct gs_texture_2d *tex = bmalloc(sizeof(struct gs_texture_2d));
-	memset(tex, 0, sizeof(struct gs_texture_2d));
+	struct gs_texture_2d *tex = bzalloc(sizeof(struct gs_texture_2d));
 
 	OSType pf = IOSurfaceGetPixelFormat(ref);
 	if (pf != 'BGRA')