Skip to content

Commit

Permalink
Backends: Metal: Conditional check, amend 7602277 (#5122, #5123)
Browse files Browse the repository at this point in the history
Co-authored-by: Wvader <34067397+wvader@users.noreply.github.com>
  • Loading branch information
rsousacode and rsousacode authored Mar 28, 2022
1 parent 1ba2905 commit 2d76b09
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backends/imgui_impl_metal.mm
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,11 @@ - (void)renderDrawData:(ImDrawData *)drawData
vertexBufferOffset += (size_t)cmd_list->VtxBuffer.Size * sizeof(ImDrawVert);
indexBufferOffset += (size_t)cmd_list->IdxBuffer.Size * sizeof(ImDrawIdx);
}

id weakSelf = self;
#if __has_feature(objc_arc)
__weak id weakSelf = self;
#else
__unsafe_unretained id weakSelf = self;
#endif
[commandBuffer addCompletedHandler:^(id<MTLCommandBuffer>)
{
dispatch_async(dispatch_get_main_queue(), ^{
Expand Down

0 comments on commit 2d76b09

Please sign in to comment.