21 Jun
2023
21 Jun
'23
9:54 a.m.
Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/wayland_surface.c:
shm_buffer->width = width; shm_buffer->height = height; shm_buffer->map_size = size; - shm_buffer->map_data = MAP_FAILED;
- fd = wayland_shmfd_create(size); - if (fd < 0) + section_size.QuadPart = size; + status = NtCreateSection(&handle, + GENERIC_READ | SECTION_MAP_READ | SECTION_MAP_WRITE, + NULL, §ion_size, PAGE_READWRITE, SEC_COMMIT, 0); + if (status != STATUS_SUCCESS)
Probably not a big deal but for future reference, it's generally done with `if (status)`. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2944#note_36450