Jacek Caban (@jacek) commented about dlls/winewayland.drv/waylanddrv_main.c:
+ +static const struct user_driver_funcs null_funcs = { 0 }; + static NTSTATUS waylanddrv_unix_init(void *arg) { - if (!wayland_process_init()) return STATUS_UNSUCCESSFUL; + /* Set the user driver functions now so that they are available during + * our initialization. We clear them on error. */ + __wine_set_user_driver(&waylanddrv_funcs, WINE_GDI_DRIVER_VERSION); + + if (!wayland_process_init()) goto err;
return 0; + +err: + __wine_set_user_driver(&null_funcs, WINE_GDI_DRIVER_VERSION); Maybe we should allow passing NULL to `__wine_set_user_driver` and handle that in win32u, which already has `null_user_driver`? For the initial MR, you could also just initialize user driver after `wayland_process_init` call and change that later, when it's needed.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/2275#note_25597