mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
(Wayland) Only display splash when necessary (#15168)
This commit is contained in:
parent
2f4ae88b06
commit
d625ca3762
@ -580,6 +580,8 @@ static bool wl_draw_splash_screen(gfx_ctx_wayland_data_t *wl)
|
|||||||
bool gfx_ctx_wl_init_common(
|
bool gfx_ctx_wl_init_common(
|
||||||
const toplevel_listener_t *toplevel_listener, gfx_ctx_wayland_data_t **wwl)
|
const toplevel_listener_t *toplevel_listener, gfx_ctx_wayland_data_t **wwl)
|
||||||
{
|
{
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
|
unsigned video_monitor_index = settings->uints.video_monitor_index;
|
||||||
int i;
|
int i;
|
||||||
*wwl = calloc(1, sizeof(gfx_ctx_wayland_data_t));
|
*wwl = calloc(1, sizeof(gfx_ctx_wayland_data_t));
|
||||||
gfx_ctx_wayland_data_t *wl = *wwl;
|
gfx_ctx_wayland_data_t *wl = *wwl;
|
||||||
@ -711,25 +713,27 @@ bool gfx_ctx_wl_init_common(
|
|||||||
/* Bind SHM based wl_buffer to wl_surface until the vulkan surface is ready.
|
/* Bind SHM based wl_buffer to wl_surface until the vulkan surface is ready.
|
||||||
* This shows the window which assigns us a display (wl_output)
|
* This shows the window which assigns us a display (wl_output)
|
||||||
* which is usefull for HiDPI and auto selecting a display for fullscreen. */
|
* which is usefull for HiDPI and auto selecting a display for fullscreen. */
|
||||||
if (!wl_draw_splash_screen(wl))
|
if (video_monitor_index == 0 && wl_list_length (&wl->all_outputs) > 1) {
|
||||||
RARCH_ERR("[Wayland]: Failed to draw splash screen\n");
|
if (!wl_draw_splash_screen(wl))
|
||||||
|
RARCH_ERR("[Wayland]: Failed to draw splash screen\n");
|
||||||
|
|
||||||
// Make sure splash screen is on screen and sized
|
// Make sure splash screen is on screen and sized
|
||||||
#ifdef HAVE_LIBDECOR_H
|
#ifdef HAVE_LIBDECOR_H
|
||||||
if (wl->libdecor)
|
if (wl->libdecor)
|
||||||
{
|
{
|
||||||
wl->configured = true;
|
wl->configured = true;
|
||||||
while (wl->configured)
|
while (wl->configured)
|
||||||
if (wl->libdecor_dispatch(wl->libdecor_context, 0) < 0)
|
if (wl->libdecor_dispatch(wl->libdecor_context, 0) < 0)
|
||||||
RARCH_ERR("[Wayland]: libdecor failed to dispatch\n");
|
RARCH_ERR("[Wayland]: libdecor failed to dispatch\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
wl->configured = true;
|
wl->configured = true;
|
||||||
|
|
||||||
while (wl->configured)
|
while (wl->configured)
|
||||||
wl_display_dispatch(wl->input.dpy);
|
wl_display_dispatch(wl->input.dpy);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wl->input.fd = wl_display_get_fd(wl->input.dpy);
|
wl->input.fd = wl_display_get_fd(wl->input.dpy);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user