a/util + st/gui: Add ro_u16 and fix ro_u32

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2590>
This commit is contained in:
Beyley Cardellio authored and Marge Bot committed 2025-10-01 14:44:12 +00:00
1 parent 2a79d34708
commit bfb4735b2b
2 files changed
+4 -1

No files matched your search

+3 -1
View File
@@ -232,6 +232,7 @@ enum u_var_kind
U_VAR_KIND_RO_FTEXT,
U_VAR_KIND_RO_I16,
U_VAR_KIND_RO_I32,
U_VAR_KIND_RO_U16,
U_VAR_KIND_RO_U32,
U_VAR_KIND_RO_F32,
U_VAR_KIND_RO_I64,
@@ -391,7 +392,8 @@ u_var_force_on(void);
ADD_FUNC(ro_ftext, const char, RO_FTEXT) \
ADD_FUNC(ro_i16, int16_t, RO_I16) \
ADD_FUNC(ro_i32, int32_t, RO_I32) \
ADD_FUNC(ro_u32, uint32_t, RO_I32) \
ADD_FUNC(ro_u16, uint16_t, RO_U16) \
ADD_FUNC(ro_u32, uint32_t, RO_U32) \
ADD_FUNC(ro_f32, float, RO_F32) \
ADD_FUNC(ro_i64, int64_t, RO_I64) \
ADD_FUNC(ro_u64, uint64_t, RO_U64) \
@@ -692,6 +692,7 @@ on_elem(struct u_var_info *info, void *priv)
case U_VAR_KIND_RO_FTEXT: igText(ptr ? (char *)ptr : "%s", name); break;
case U_VAR_KIND_RO_I16: igInputScalar(name, ImGuiDataType_S16, ptr, NULL, NULL, NULL, ro_i_flags); break;
case U_VAR_KIND_RO_I32: igInputScalar(name, ImGuiDataType_S32, ptr, NULL, NULL, NULL, ro_i_flags); break;
case U_VAR_KIND_RO_U16: igInputScalar(name, ImGuiDataType_U16, ptr, NULL, NULL, NULL, ro_i_flags); break;
case U_VAR_KIND_RO_U32: igInputScalar(name, ImGuiDataType_U32, ptr, NULL, NULL, NULL, ro_i_flags); break;
case U_VAR_KIND_RO_F32: igInputScalar(name, ImGuiDataType_Float, ptr, NULL, NULL, "%+f", ro_i_flags); break;
case U_VAR_KIND_RO_I64: igInputScalar(name, ImGuiDataType_S64, ptr, NULL, NULL, NULL, ro_i_flags); break;