mirror of
https://github.com/mpv-player/mpv
synced 2025-04-11 04:01:31 +00:00
wayland: simplify egl_create_window
Removes the local ret because it was only in an assert statement and also removes the window size assignments, because they are already done in config_wnidow_wayland.
This commit is contained in:
parent
ba43d98ac2
commit
db6325853a
@ -1447,13 +1447,6 @@ static void egl_create_window(struct vo_wayland_state *wl,
|
|||||||
uint32_t width,
|
uint32_t width,
|
||||||
uint32_t height)
|
uint32_t height)
|
||||||
{
|
{
|
||||||
EGLBoolean ret;
|
|
||||||
|
|
||||||
wl->window->pending_width = width;
|
|
||||||
wl->window->pending_height = height;
|
|
||||||
wl->window->width = width;
|
|
||||||
wl->window->height = height;
|
|
||||||
|
|
||||||
egl_ctx->egl_window = wl_egl_window_create(wl->window->surface,
|
egl_ctx->egl_window = wl_egl_window_create(wl->window->surface,
|
||||||
wl->window->width,
|
wl->window->width,
|
||||||
wl->window->height);
|
wl->window->height);
|
||||||
@ -1463,12 +1456,10 @@ static void egl_create_window(struct vo_wayland_state *wl,
|
|||||||
egl_ctx->egl_window,
|
egl_ctx->egl_window,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
ret = eglMakeCurrent(egl_ctx->egl.dpy,
|
eglMakeCurrent(egl_ctx->egl.dpy,
|
||||||
egl_ctx->egl_surface,
|
egl_ctx->egl_surface,
|
||||||
egl_ctx->egl_surface,
|
egl_ctx->egl_surface,
|
||||||
egl_ctx->egl.ctx);
|
egl_ctx->egl.ctx);
|
||||||
|
|
||||||
assert(ret == EGL_TRUE);
|
|
||||||
|
|
||||||
wl_display_dispatch_pending(wl->display->display);
|
wl_display_dispatch_pending(wl->display->display);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user