/* Parse the received data */
result = g_variant_get_child_value(g_dbus_message_get_body(reply), 0);
if (g_variant_n_children(result) <= res->index) {
- ret = -EINVAL;
- goto err_reply;
+ fps_data.fps = 0.0;
+ goto out;
}
/* Get the fps information according to the index of resource_device */
&fps_data.type, fps_data.output, &fps_data.zpos,
&fps_data.window, &fps_data.fps);
+out:
*data = (void *)(intptr_t)fps_data.fps;
err_reply:
.type = RESOURCE_TYPE_DISPLAY,
.attrs = display_attrs,
.num_attrs = ARRAY_SIZE(display_attrs),
+ .flags = RESOURCE_DRIVER_NO_DEVICE,
};
RESOURCE_DRIVER_REGISTER(&display_resource_driver)