mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-19 20:18:07 +00:00
opengl: EGLattrib arrays need no explicit sentinel
Array literals automagically gain the sentinel when assigned the correct type. Neat, huh? See https://ziglang.org/documentation/0.16.0/#Sentinel-Terminated-Arrays
This commit is contained in:
@@ -69,7 +69,6 @@ pub fn init(alloc: Allocator, opts: rendererpkg.Options) !OpenGL {
|
||||
egl.c.EGL_GREEN_SIZE, 8,
|
||||
egl.c.EGL_BLUE_SIZE, 8,
|
||||
egl.c.EGL_ALPHA_SIZE, 8,
|
||||
egl.c.EGL_NONE,
|
||||
}) catch |err| {
|
||||
log.warn("failed to choose config err={}", .{err});
|
||||
return err;
|
||||
@@ -80,7 +79,6 @@ pub fn init(alloc: Allocator, opts: rendererpkg.Options) !OpenGL {
|
||||
egl.c.EGL_CONTEXT_MAJOR_VERSION, MIN_VERSION_MAJOR,
|
||||
egl.c.EGL_CONTEXT_MINOR_VERSION, MIN_VERSION_MINOR,
|
||||
egl.c.EGL_CONTEXT_OPENGL_PROFILE_MASK, egl.c.EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT,
|
||||
egl.c.EGL_NONE,
|
||||
}) catch |err| {
|
||||
log.warn("failed to create EGL context err={}", .{err});
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user