diff --git a/include/bgfx/c99/bgfx.h b/include/bgfx/c99/bgfx.h index 877dd7e64..f0c1bc58d 100644 --- a/include/bgfx/c99/bgfx.h +++ b/include/bgfx/c99/bgfx.h @@ -463,6 +463,8 @@ typedef struct bgfx_vertex_buffer_handle_s { uint16_t idx; } bgfx_vertex_buffer_ typedef struct bgfx_vertex_decl_handle_s { uint16_t idx; } bgfx_vertex_decl_handle_t; +#define BGFX_HANDLE_IS_VALID(h) ((h).idx != UINT16_MAX) + /** * Memory release callback. * diff --git a/scripts/temp.bgfx.h b/scripts/temp.bgfx.h index 995c53096..e1dde4ccf 100644 --- a/scripts/temp.bgfx.h +++ b/scripts/temp.bgfx.h @@ -106,6 +106,8 @@ typedef struct bgfx_callback_vtbl_s $chandles +#define BGFX_HANDLE_IS_VALID(h) ((h).idx != UINT16_MAX) + $cfuncptrs $cstructs