Explorar o código

libobs: Map wayland keymap with MAP_PRIVATE

Wayland clients are required to use MAP_PRIVATE starting with version 7
of the wl_seat protocol.

Signed-off-by: Julian Orth <[email protected]>
Julian Orth %!s(int64=3) %!d(string=hai) anos
pai
achega
99a6c97b9e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      libobs/obs-nix-wayland.c

+ 1 - 1
libobs/obs-nix-wayland.c

@@ -84,7 +84,7 @@ static void platform_keyboard_keymap(void *data, struct wl_keyboard *keyboard,
 	UNUSED_PARAMETER(format);
 	obs_hotkeys_platform_t *plat = (obs_hotkeys_platform_t *)data;
 
-	char *keymap_shm = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);
+	char *keymap_shm = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
 	if (keymap_shm == MAP_FAILED) {
 		close(fd);
 		return;