mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Move Wayland driver above dummy, check for driver availability before creation
This commit is contained in:
parent
2ddd0c58c9
commit
cf9828a2a6
@ -83,11 +83,11 @@ static VideoBootStrap *bootstrap[] = {
|
|||||||
#if SDL_VIDEO_DRIVER_RPI
|
#if SDL_VIDEO_DRIVER_RPI
|
||||||
&RPI_bootstrap,
|
&RPI_bootstrap,
|
||||||
#endif
|
#endif
|
||||||
#if SDL_VIDEO_DRIVER_DUMMY
|
|
||||||
&DUMMY_bootstrap,
|
|
||||||
#endif
|
|
||||||
#if SDL_VIDEO_DRIVER_WAYLAND
|
#if SDL_VIDEO_DRIVER_WAYLAND
|
||||||
&Wayland_bootstrap,
|
&Wayland_bootstrap,
|
||||||
|
#endif
|
||||||
|
#if SDL_VIDEO_DRIVER_DUMMY
|
||||||
|
&DUMMY_bootstrap,
|
||||||
#endif
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
@ -447,8 +447,10 @@ SDL_VideoInit(const char *driver_name)
|
|||||||
if (driver_name != NULL) {
|
if (driver_name != NULL) {
|
||||||
for (i = 0; bootstrap[i]; ++i) {
|
for (i = 0; bootstrap[i]; ++i) {
|
||||||
if (SDL_strncasecmp(bootstrap[i]->name, driver_name, SDL_strlen(driver_name)) == 0) {
|
if (SDL_strncasecmp(bootstrap[i]->name, driver_name, SDL_strlen(driver_name)) == 0) {
|
||||||
video = bootstrap[i]->create(index);
|
if (bootstrap[i]->available()) {
|
||||||
break;
|
video = bootstrap[i]->create(index);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user