Skip to content

Commit

Permalink
sokol/metal: tentative drawable fetching fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qwx9 committed Dec 19, 2024
1 parent 79e2955 commit 7cd33d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sokol/sokol_gfx_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ static void _sgx_mtl_query_image_pixels(_sg_image_t* img, void* pixels) {
}

static void _sgx_mtl_query_pixels(int x, int y, int w, int h, bool origin_top_left, void *pixels) {
id<CAMetalDrawable> mtl_drawable = (__bridge id<CAMetalDrawable>)_sg.mtl.drawable_cb();
id<CAMetalDrawable> mtl_drawable = (__bridge id<CAMetalDrawable>)sapp_metal_get_current_drawable();
_sgx_mtl_encode_texture_pixels(x, y, w, h, origin_top_left, mtl_drawable.texture, pixels);
}

Expand Down

0 comments on commit 7cd33d9

Please sign in to comment.