mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 23:00:41 +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 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,
|
||||
wl->window->width,
|
||||
wl->window->height);
|
||||
@ -1463,12 +1456,10 @@ static void egl_create_window(struct vo_wayland_state *wl,
|
||||
egl_ctx->egl_window,
|
||||
NULL);
|
||||
|
||||
ret = eglMakeCurrent(egl_ctx->egl.dpy,
|
||||
egl_ctx->egl_surface,
|
||||
egl_ctx->egl_surface,
|
||||
egl_ctx->egl.ctx);
|
||||
|
||||
assert(ret == EGL_TRUE);
|
||||
eglMakeCurrent(egl_ctx->egl.dpy,
|
||||
egl_ctx->egl_surface,
|
||||
egl_ctx->egl_surface,
|
||||
egl_ctx->egl.ctx);
|
||||
|
||||
wl_display_dispatch_pending(wl->display->display);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user