Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
GH Action committed Oct 22, 2024
1 parent 580b2ac commit fe47d20
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/sokol/c/sokol_imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,8 @@ SOKOL_IMGUI_API_DECL void simgui_render(void);
SOKOL_IMGUI_API_DECL simgui_image_t simgui_make_image(const simgui_image_desc_t* desc);
SOKOL_IMGUI_API_DECL void simgui_destroy_image(simgui_image_t img);
SOKOL_IMGUI_API_DECL simgui_image_desc_t simgui_query_image_desc(simgui_image_t img);
SOKOL_IMGUI_API_DECL void* simgui_imtextureid(simgui_image_t img);
SOKOL_IMGUI_API_DECL simgui_image_t simgui_image_from_imtextureid(void* im_texture_id);
SOKOL_IMGUI_API_DECL uint64_t simgui_imtextureid(simgui_image_t img);
SOKOL_IMGUI_API_DECL simgui_image_t simgui_image_from_imtextureid(uint64_t im_texture_id);
SOKOL_IMGUI_API_DECL void simgui_add_focus_event(bool focus);
SOKOL_IMGUI_API_DECL void simgui_add_mouse_pos_event(float x, float y);
SOKOL_IMGUI_API_DECL void simgui_add_touch_pos_event(float x, float y);
Expand Down Expand Up @@ -2505,14 +2505,14 @@ SOKOL_API_IMPL simgui_image_desc_t simgui_query_image_desc(simgui_image_t img_id
return desc;
}

SOKOL_API_IMPL void* simgui_imtextureid(simgui_image_t img) {
SOKOL_API_IMPL uint64_t simgui_imtextureid(simgui_image_t img) {
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
return (void*)(uintptr_t)img.id;
return (uint64_t)(uintptr_t)img.id;
}

SOKOL_API_IMPL simgui_image_t simgui_image_from_imtextureid(void* im_texture_id) {
SOKOL_API_IMPL simgui_image_t simgui_image_from_imtextureid(uint64_t im_texture_id) {
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
simgui_image_t img = { (uint32_t)(uintptr_t) im_texture_id };
simgui_image_t img = { (uint32_t)im_texture_id };
return img;
}

Expand Down
8 changes: 4 additions & 4 deletions src/sokol/imgui.zig
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ pub extern fn simgui_query_image_desc(Image) ImageDesc;
pub fn queryImageDesc(img: Image) ImageDesc {
return simgui_query_image_desc(img);
}
pub extern fn simgui_imtextureid(Image) ?*anyopaque;
pub fn imtextureid(img: Image) ?*anyopaque {
pub extern fn simgui_imtextureid(Image) u64;
pub fn imtextureid(img: Image) u64 {
return simgui_imtextureid(img);
}
pub extern fn simgui_image_from_imtextureid(?*anyopaque) Image;
pub fn imageFromImtextureid(im_texture_id: ?*anyopaque) Image {
pub extern fn simgui_image_from_imtextureid(u64) Image;
pub fn imageFromImtextureid(im_texture_id: u64) Image {
return simgui_image_from_imtextureid(im_texture_id);
}
pub extern fn simgui_add_focus_event(bool) void;
Expand Down

0 comments on commit fe47d20

Please sign in to comment.