diff --git a/libc3/window/sdl2/window_sdl2.c b/libc3/window/sdl2/window_sdl2.c
index 3a85157..cb64808 100644
--- a/libc3/window/sdl2/window_sdl2.c
+++ b/libc3/window/sdl2/window_sdl2.c
@@ -276,8 +276,7 @@ bool window_sdl2_run (s_window_sdl2 *window)
assert(glGetError() == GL_NO_ERROR);
window->gl_w = gl_w;
window->gl_h = gl_h;
- glViewport(0, 0, sdl_event.window.data1,
- sdl_event.window.data2);
+ glViewport(0, 0, gl_w, gl_h);
}
break;
default: