The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

c/direct: Shorten displays member names.

authored by

Lubosz Sarnecki and committed by
Jakob Bornecrantz
77207ed5 29b77181

+17 -19
+8 -10
src/xrt/compositor/main/comp_window_direct_nvidia.c
··· 37 37 struct comp_window base; 38 38 39 39 Display *dpy; 40 - struct comp_window_direct_nvidia_display *nv_displays; 40 + struct comp_window_direct_nvidia_display *displays; 41 41 uint16_t num_displays; 42 42 }; 43 - 44 - 45 43 46 44 /* 47 45 * ··· 102 100 103 101 for (uint32_t i = 0; i < w_direct->num_displays; i++) { 104 102 struct comp_window_direct_nvidia_display *d = 105 - &w_direct->nv_displays[i]; 103 + &w_direct->displays[i]; 106 104 d->display = VK_NULL_HANDLE; 107 105 free(d->name); 108 106 } 109 107 110 - if (w_direct->nv_displays != NULL) 111 - free(w_direct->nv_displays); 108 + if (w_direct->displays != NULL) 109 + free(w_direct->displays); 112 110 113 111 if (w_direct->dpy) { 114 112 XCloseDisplay(w_direct->dpy); ··· 144 142 145 143 w->num_displays += 1; 146 144 147 - U_ARRAY_REALLOC_OR_FREE(w->nv_displays, 145 + U_ARRAY_REALLOC_OR_FREE(w->displays, 148 146 struct comp_window_direct_nvidia_display, 149 147 w->num_displays); 150 148 151 - if (w->nv_displays == NULL) 149 + if (w->displays == NULL) 152 150 COMP_ERROR(w->base.c, "Unable to reallocate randr_displays"); 153 151 154 - w->nv_displays[w->num_displays - 1] = d; 152 + w->displays[w->num_displays - 1] = d; 155 153 156 154 return true; 157 155 } ··· 241 239 if (w->num_displays <= (uint32_t)index) 242 240 return NULL; 243 241 244 - return &w->nv_displays[index]; 242 + return &w->displays[index]; 245 243 } 246 244 247 245 static bool
+9 -9
src/xrt/compositor/main/comp_window_direct_randr.c
··· 45 45 Display *dpy; 46 46 xcb_screen_t *screen; 47 47 48 - struct comp_window_direct_randr_display *randr_displays; 48 + struct comp_window_direct_randr_display *displays; 49 49 50 50 uint16_t num_displays; 51 51 }; ··· 122 122 123 123 for (uint32_t i = 0; i < w_direct->num_displays; i++) { 124 124 struct comp_window_direct_randr_display *d = 125 - &w_direct->randr_displays[i]; 125 + &w_direct->displays[i]; 126 126 127 127 if (d->display == VK_NULL_HANDLE) { 128 128 continue; ··· 133 133 free(d->name); 134 134 } 135 135 136 - if (w_direct->randr_displays != NULL) 137 - free(w_direct->randr_displays); 136 + if (w_direct->displays != NULL) 137 + free(w_direct->displays); 138 138 139 139 if (w_direct->dpy) { 140 140 XCloseDisplay(w_direct->dpy); ··· 149 149 { 150 150 for (int i = 0; i < w->num_displays; i++) { 151 151 const struct comp_window_direct_randr_display *d = 152 - &w->randr_displays[i]; 152 + &w->displays[i]; 153 153 COMP_DEBUG( 154 154 w->base.c, "%d: %s %dx%d@%.2f", i, d->name, 155 155 d->primary_mode.width, d->primary_mode.height, ··· 227 227 if (w->num_displays <= (uint32_t)index) 228 228 return NULL; 229 229 230 - return &w->randr_displays[index]; 230 + return &w->displays[index]; 231 231 } 232 232 233 233 static bool ··· 352 352 353 353 w->num_displays += 1; 354 354 355 - U_ARRAY_REALLOC_OR_FREE(w->randr_displays, 355 + U_ARRAY_REALLOC_OR_FREE(w->displays, 356 356 struct comp_window_direct_randr_display, 357 357 w->num_displays); 358 358 359 - if (w->randr_displays == NULL) 359 + if (w->displays == NULL) 360 360 COMP_ERROR(w->base.c, "Unable to reallocate randr_displays"); 361 361 362 - w->randr_displays[w->num_displays - 1] = d; 362 + w->displays[w->num_displays - 1] = d; 363 363 } 364 364 365 365 static void