mirror of https://github.com/encounter/SDL.git
video: Prefer Wayland over X11
This commit is contained in:
parent
68a71f91c6
commit
8ceba27d62
|
@ -61,12 +61,12 @@ static VideoBootStrap *bootstrap[] = {
|
||||||
#if SDL_VIDEO_DRIVER_COCOA
|
#if SDL_VIDEO_DRIVER_COCOA
|
||||||
&COCOA_bootstrap,
|
&COCOA_bootstrap,
|
||||||
#endif
|
#endif
|
||||||
#if SDL_VIDEO_DRIVER_X11
|
|
||||||
&X11_bootstrap,
|
|
||||||
#endif
|
|
||||||
#if SDL_VIDEO_DRIVER_WAYLAND
|
#if SDL_VIDEO_DRIVER_WAYLAND
|
||||||
&Wayland_bootstrap,
|
&Wayland_bootstrap,
|
||||||
#endif
|
#endif
|
||||||
|
#if SDL_VIDEO_DRIVER_X11
|
||||||
|
&X11_bootstrap,
|
||||||
|
#endif
|
||||||
#if SDL_VIDEO_DRIVER_VIVANTE
|
#if SDL_VIDEO_DRIVER_VIVANTE
|
||||||
&VIVANTE_bootstrap,
|
&VIVANTE_bootstrap,
|
||||||
#endif
|
#endif
|
||||||
|
@ -4249,12 +4249,12 @@ SDL_IsScreenKeyboardShown(SDL_Window *window)
|
||||||
#if SDL_VIDEO_DRIVER_UIKIT
|
#if SDL_VIDEO_DRIVER_UIKIT
|
||||||
#include "uikit/SDL_uikitmessagebox.h"
|
#include "uikit/SDL_uikitmessagebox.h"
|
||||||
#endif
|
#endif
|
||||||
#if SDL_VIDEO_DRIVER_X11
|
|
||||||
#include "x11/SDL_x11messagebox.h"
|
|
||||||
#endif
|
|
||||||
#if SDL_VIDEO_DRIVER_WAYLAND
|
#if SDL_VIDEO_DRIVER_WAYLAND
|
||||||
#include "wayland/SDL_waylandmessagebox.h"
|
#include "wayland/SDL_waylandmessagebox.h"
|
||||||
#endif
|
#endif
|
||||||
|
#if SDL_VIDEO_DRIVER_X11
|
||||||
|
#include "x11/SDL_x11messagebox.h"
|
||||||
|
#endif
|
||||||
#if SDL_VIDEO_DRIVER_HAIKU
|
#if SDL_VIDEO_DRIVER_HAIKU
|
||||||
#include "haiku/SDL_bmessagebox.h"
|
#include "haiku/SDL_bmessagebox.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -4362,13 +4362,6 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
|
||||||
retval = 0;
|
retval = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if SDL_VIDEO_DRIVER_X11
|
|
||||||
if (retval == -1 &&
|
|
||||||
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_X11) &&
|
|
||||||
X11_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
|
||||||
retval = 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#if SDL_VIDEO_DRIVER_WAYLAND
|
#if SDL_VIDEO_DRIVER_WAYLAND
|
||||||
if (retval == -1 &&
|
if (retval == -1 &&
|
||||||
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WAYLAND) &&
|
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WAYLAND) &&
|
||||||
|
@ -4376,6 +4369,13 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
|
||||||
retval = 0;
|
retval = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#if SDL_VIDEO_DRIVER_X11
|
||||||
|
if (retval == -1 &&
|
||||||
|
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_X11) &&
|
||||||
|
X11_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||||
|
retval = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#if SDL_VIDEO_DRIVER_HAIKU
|
#if SDL_VIDEO_DRIVER_HAIKU
|
||||||
if (retval == -1 &&
|
if (retval == -1 &&
|
||||||
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_HAIKU) &&
|
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_HAIKU) &&
|
||||||
|
|
Loading…
Reference in New Issue