diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 35aa1b5f31..38b01d3703 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -90,12 +90,9 @@ static void handle_toplevel_config_common(void *data, break; } } - if ( width > 0 - && height > 0) - { - wl->width = width; - wl->height = height; - } + + wl->width = width > 0 ? width : DEFAULT_WINDOWED_WIDTH; + wl->height = height > 0 ? height : DEFAULT_WINDOWED_HEIGHT; #ifdef HAVE_EGL if (wl->win) diff --git a/gfx/drivers_context/wayland_vk_ctx.c b/gfx/drivers_context/wayland_vk_ctx.c index fd68f6073c..1f2167f28b 100644 --- a/gfx/drivers_context/wayland_vk_ctx.c +++ b/gfx/drivers_context/wayland_vk_ctx.c @@ -83,12 +83,9 @@ static void handle_toplevel_config_common(void *data, break; } } - if ( width > 0 - && height > 0) - { - wl->width = width; - wl->height = height; - } + + wl->width = width > 0 ? width : DEFAULT_WINDOWED_WIDTH; + wl->height = height > 0 ? height : DEFAULT_WINDOWED_HEIGHT; wl->configured = false; }