Closed zbaylin closed 3 years ago
Hi @zbaylin,
I tested this commit by building oni2 against it under wayland/sway and encountered a few build errors:
CC build/SDL_waylandevents.lo
/home/cutebabyyoda/.esy/3/b/esy_sdl2-3dca9ff4/src/video/wayland/SDL_waylandevents.c:586:1: error: redefinition of 'pointer_handle_frame'
586 | pointer_handle_frame(void *data, struct wl_pointer *pointer)
| ^~~~~~~~~~~~~~~~~~~~
/home/cutebabyyoda/.esy/3/b/esy_sdl2-3dca9ff4/src/video/wayland/SDL_waylandevents.c:533:1: note: previous definition of 'pointer_handle_frame' was here
533 | pointer_handle_frame(void *data, struct wl_pointer *pointer)
| ^~~~~~~~~~~~~~~~~~~~
/home/cutebabyyoda/.esy/3/b/esy_sdl2-3dca9ff4/src/video/wayland/SDL_waylandevents.c:602:1: error: redefinition of 'pointer_handle_axis_source'
602 | pointer_handle_axis_source(void *data, struct wl_pointer *pointer,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/cutebabyyoda/.esy/3/b/esy_sdl2-3dca9ff4/src/video/wayland/SDL_waylandevents.c:539:1: note: previous definition of 'pointer_handle_axis_source' was here
539 | pointer_handle_axis_source(void *data, struct wl_pointer *pointer,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/cutebabyyoda/.esy/3/b/esy_sdl2-3dca9ff4/src/video/wayland/SDL_waylandevents.c:609:1: error: redefinition of 'pointer_handle_axis_stop'
609 | pointer_handle_axis_stop(void *data, struct wl_pointer *pointer,
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/cutebabyyoda/.esy/3/b/esy_sdl2-3dca9ff4/src/video/wayland/SDL_waylandevents.c:559:1: note: previous definition of 'pointer_handle_axis_stop' was here
559 | pointer_handle_axis_stop(void *data, struct wl_pointer *pointer,
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/cutebabyyoda/.esy/3/b/esy_sdl2-3dca9ff4/src/video/wayland/SDL_waylandevents.c:616:1: error: conflicting types for 'pointer_handle_axis_discrete'
616 | pointer_handle_axis_discrete(void *data, struct wl_pointer *pointer,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/cutebabyyoda/.esy/3/b/esy_sdl2-3dca9ff4/src/video/wayland/SDL_waylandevents.c:569:1: note: previous definition of 'pointer_handle_axis_discrete' was here
569 | pointer_handle_axis_discrete(void *data, struct wl_pointer *pointer,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/cutebabyyoda/.esy/3/b/esy_sdl2-3dca9ff4/src/video/wayland/SDL_waylandevents.c:569:1: warning: 'pointer_handle_axis_discrete' defined but not used [-Wunused-function]
/home/cutebabyyoda/.esy/3/b/esy_sdl2-3dca9ff4/src/video/wayland/SDL_waylandevents.c:559:1: warning: 'pointer_handle_axis_stop' defined but not used [-Wunused-function]
559 | pointer_handle_axis_stop(void *data, struct wl_pointer *pointer,
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/cutebabyyoda/.esy/3/b/esy_sdl2-3dca9ff4/src/video/wayland/SDL_waylandevents.c:539:1: warning: 'pointer_handle_axis_source' defined but not used [-Wunused-function]
539 | pointer_handle_axis_source(void *data, struct wl_pointer *pointer,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/cutebabyyoda/.esy/3/b/esy_sdl2-3dca9ff4/src/video/wayland/SDL_waylandevents.c:533:1: warning: 'pointer_handle_frame' defined but not used [-Wunused-function]
533 | pointer_handle_frame(void *data, struct wl_pointer *pointer)
| ^~~~~~~~~~~~~~~~~~~~
/home/cutebabyyoda/.esy/3/b/esy_sdl2-3dca9ff4/src/video/wayland/SDL_waylandevents.c:448:1: warning: 'pointer_handle_axis_common_v1' defined but not used [-Wunused-function]
448 | pointer_handle_axis_common_v1(struct SDL_WaylandInput *input,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:668: build/SDL_waylandevents.lo] Error 1
error: command failed: 'bash' '-c' './build-scripts/esybuild.sh --os=linux' (exited with 2)
esy-build-package: exiting with errors above...
I think you may have introduced some duplicate functions in your merge.
I commented out the functions from upstream that had been replaced. It built successfully and seemed to work under wayland/sway, including key-repeat (see onivim/oni2#2191).
@canarysnort01 I think I just fixed the Wayland issues -- sorry about that! Let me know if it works for you now.
Exciting that this fixes https://github.com/onivim/oni2/issues/2191 too 👍
Hi @zbaylin, I just rebuilt oni2 from master and it is working. Thanks!
SDL 2.0.10/12 have issues building on macOS Big Sur, since GLES support has been removed and using the
--disable-video-opengles(1|2)
flags don't seem to be enough (there are other places where GLES is used it seems). The recently released SDL 2.0.14 fixes this issue.Luckily
git
was able to merge most of it for me. The only file I had to manually merge wasSDL_waylandevents.c
-- I'll try to setup a wayland VM to make sure there is no issue building there.I also had to disable Joystick support on macOS since strangely it was requiring iOS APIs, but I don't think we use those anywhere so that should be okay for now.