tests: fixup C test override checking

This commit is contained in:
Vaxry 2024-10-01 23:26:44 +01:00
parent 5729b9733d
commit d60e1e01e6

View file

@ -27,11 +27,22 @@ int main(int argc, char** argv) {
}
hyprcursor_cursor_raw_shape_data* shapeData = hyprcursor_get_raw_shape_data(mgr, "left_ptr");
if (!shapeData || shapeData->len <= 0) {
if (!shapeData) {
printf("failed querying left_ptr\n");
return 1;
}
if (shapeData->overridenBy) {
hyprcursor_cursor_raw_shape_data* ov = hyprcursor_get_raw_shape_data(mgr, shapeData->overridenBy);
hyprcursor_raw_shape_data_free(shapeData);
shapeData = ov;
}
if (!shapeData || shapeData->len <= 0) {
printf("left_ptr has no images\n");
return 1;
}
printf("left_ptr images: %d\n", shapeData->len);
for (size_t i = 0; i < shapeData->len; ++i) {