Dynamically load libwayland-egl.so.1 when dealing with Wayland to remove dependencies at program startup. (#3359)

This commit is contained in:
Martijn Courteaux
2024-10-01 20:06:56 +02:00
committed by GitHub
parent 7e5bb54a3e
commit a6e372ead9
4 changed files with 51 additions and 37 deletions

View File

@@ -8,9 +8,6 @@
#if ENTRY_CONFIG_USE_SDL
#if BX_PLATFORM_LINUX
# if ENTRY_CONFIG_USE_WAYLAND
# include <wayland-egl.h>
# endif
#elif BX_PLATFORM_WINDOWS
# define SDL_MAIN_HANDLED
#endif
@@ -68,16 +65,6 @@ namespace entry
{
if(!_window)
return;
# if BX_PLATFORM_LINUX
# if ENTRY_CONFIG_USE_WAYLAND
wl_egl_window *win_impl = (wl_egl_window*)SDL_GetWindowData(_window, "wl_egl_window");
if(win_impl)
{
SDL_SetWindowData(_window, "wl_egl_window", nullptr);
wl_egl_window_destroy(win_impl);
}
# endif
# endif
SDL_DestroyWindow(_window);
}