diff --git a/raylib/external/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c b/raylib/external/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c index 0220868..1a77873 100644 --- a/raylib/external/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c +++ b/raylib/external/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c @@ -31,7 +31,7 @@ extern const struct wl_interface wl_pointer_interface; extern const struct wl_interface zwp_relative_pointer_v1_interface; -static const struct wl_interface *types[] = { +static const struct wl_interface *types2[] = { NULL, NULL, NULL, @@ -43,8 +43,8 @@ static const struct wl_interface *types[] = { }; static const struct wl_message zwp_relative_pointer_manager_v1_requests[] = { - { "destroy", "", types + 0 }, - { "get_relative_pointer", "no", types + 6 }, + { "destroy", "", types2 + 0 }, + { "get_relative_pointer", "no", types2 + 6 }, }; WL_EXPORT const struct wl_interface zwp_relative_pointer_manager_v1_interface = { @@ -54,11 +54,11 @@ WL_EXPORT const struct wl_interface zwp_relative_pointer_manager_v1_interface = }; static const struct wl_message zwp_relative_pointer_v1_requests[] = { - { "destroy", "", types + 0 }, + { "destroy", "", types2 + 0 }, }; static const struct wl_message zwp_relative_pointer_v1_events[] = { - { "relative_motion", "uuffff", types + 0 }, + { "relative_motion", "uuffff", types2 + 0 }, }; WL_EXPORT const struct wl_interface zwp_relative_pointer_v1_interface = { diff --git a/raylib/external/scripts/glfw-generate-wayland.sh b/raylib/external/scripts/glfw-generate-wayland.sh index 290ef93..d15567d 100755 --- a/raylib/external/scripts/glfw-generate-wayland.sh +++ b/raylib/external/scripts/glfw-generate-wayland.sh @@ -7,6 +7,10 @@ cd $TMPDIR git clone https://github.com/wayland-project/wayland-protocols cd wayland-protocols +rm -f "$GLGLFW_PATH"/wayland-pointer-constraints-unstable-v1-client-protocol.{h,c} +rm -f "$GLGLFW_PATH"/wayland-relative-pointer-unstable-v1-client-protocol.{h,c} +rm -f "$GLGLFW_PATH"/wayland-idle-inhibit-unstable-v1-client-protocol.{h,c} + wayland-scanner code ./unstable/pointer-constraints/pointer-constraints-unstable-v1.xml "$GLGLFW_PATH"/wayland-pointer-constraints-unstable-v1-client-protocol.c wayland-scanner client-header ./unstable/pointer-constraints/pointer-constraints-unstable-v1.xml "$GLGLFW_PATH"/wayland-pointer-constraints-unstable-v1-client-protocol.h @@ -15,3 +19,6 @@ wayland-scanner client-header ./unstable/relative-pointer/relative-pointer-unsta wayland-scanner code ./unstable/idle-inhibit/idle-inhibit-unstable-v1.xml "$GLGLFW_PATH"/wayland-idle-inhibit-unstable-v1-client-protocol.c wayland-scanner client-header ./unstable/idle-inhibit/idle-inhibit-unstable-v1.xml "$GLGLFW_PATH"/wayland-idle-inhibit-unstable-v1-client-protocol.h + +# Patch for cgo +sed -i "s|types|types2|g" "$GLGLFW_PATH"/wayland-relative-pointer-unstable-v1-client-protocol.c