diff --git a/src/xrt/compositor/main/comp_window_direct_nvidia.c b/src/xrt/compositor/main/comp_window_direct_nvidia.c index 246d55ede..42421c70c 100644 --- a/src/xrt/compositor/main/comp_window_direct_nvidia.c +++ b/src/xrt/compositor/main/comp_window_direct_nvidia.c @@ -37,12 +37,10 @@ struct comp_window_direct_nvidia struct comp_window base; Display *dpy; - struct comp_window_direct_nvidia_display *nv_displays; + struct comp_window_direct_nvidia_display *displays; uint16_t num_displays; }; - - /* * * Pre decalre functions @@ -102,13 +100,13 @@ comp_window_direct_nvidia_destroy(struct comp_window *w) for (uint32_t i = 0; i < w_direct->num_displays; i++) { struct comp_window_direct_nvidia_display *d = - &w_direct->nv_displays[i]; + &w_direct->displays[i]; d->display = VK_NULL_HANDLE; free(d->name); } - if (w_direct->nv_displays != NULL) - free(w_direct->nv_displays); + if (w_direct->displays != NULL) + free(w_direct->displays); if (w_direct->dpy) { XCloseDisplay(w_direct->dpy); @@ -144,14 +142,14 @@ append_nvidia_entry_on_match(struct comp_window_direct_nvidia *w, w->num_displays += 1; - U_ARRAY_REALLOC_OR_FREE(w->nv_displays, + U_ARRAY_REALLOC_OR_FREE(w->displays, struct comp_window_direct_nvidia_display, w->num_displays); - if (w->nv_displays == NULL) + if (w->displays == NULL) COMP_ERROR(w->base.c, "Unable to reallocate randr_displays"); - w->nv_displays[w->num_displays - 1] = d; + w->displays[w->num_displays - 1] = d; return true; } @@ -241,7 +239,7 @@ comp_window_direct_nvidia_current_display(struct comp_window_direct_nvidia *w) if (w->num_displays <= (uint32_t)index) return NULL; - return &w->nv_displays[index]; + return &w->displays[index]; } static bool diff --git a/src/xrt/compositor/main/comp_window_direct_randr.c b/src/xrt/compositor/main/comp_window_direct_randr.c index 4b558e428..9cff5495e 100644 --- a/src/xrt/compositor/main/comp_window_direct_randr.c +++ b/src/xrt/compositor/main/comp_window_direct_randr.c @@ -45,7 +45,7 @@ struct comp_window_direct_randr Display *dpy; xcb_screen_t *screen; - struct comp_window_direct_randr_display *randr_displays; + struct comp_window_direct_randr_display *displays; uint16_t num_displays; }; @@ -122,7 +122,7 @@ comp_window_direct_randr_destroy(struct comp_window *w) for (uint32_t i = 0; i < w_direct->num_displays; i++) { struct comp_window_direct_randr_display *d = - &w_direct->randr_displays[i]; + &w_direct->displays[i]; if (d->display == VK_NULL_HANDLE) { continue; @@ -133,8 +133,8 @@ comp_window_direct_randr_destroy(struct comp_window *w) free(d->name); } - if (w_direct->randr_displays != NULL) - free(w_direct->randr_displays); + if (w_direct->displays != NULL) + free(w_direct->displays); if (w_direct->dpy) { XCloseDisplay(w_direct->dpy); @@ -149,7 +149,7 @@ comp_window_direct_randr_list_screens(struct comp_window_direct_randr *w) { for (int i = 0; i < w->num_displays; i++) { const struct comp_window_direct_randr_display *d = - &w->randr_displays[i]; + &w->displays[i]; COMP_DEBUG( w->base.c, "%d: %s %dx%d@%.2f", i, d->name, d->primary_mode.width, d->primary_mode.height, @@ -227,7 +227,7 @@ comp_window_direct_randr_current_display(struct comp_window_direct_randr *w) if (w->num_displays <= (uint32_t)index) return NULL; - return &w->randr_displays[index]; + return &w->displays[index]; } static bool @@ -352,14 +352,14 @@ append_randr_display(struct comp_window_direct_randr *w, w->num_displays += 1; - U_ARRAY_REALLOC_OR_FREE(w->randr_displays, + U_ARRAY_REALLOC_OR_FREE(w->displays, struct comp_window_direct_randr_display, w->num_displays); - if (w->randr_displays == NULL) + if (w->displays == NULL) COMP_ERROR(w->base.c, "Unable to reallocate randr_displays"); - w->randr_displays[w->num_displays - 1] = d; + w->displays[w->num_displays - 1] = d; } static void