From b6d539d8e8f2ebd922e0b481a47f06f332345950 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Thu, 7 Nov 2024 13:25:26 +0900 Subject: [PATCH] internal/graphicsdriver/opengl: refactoring --- internal/graphicsdriver/opengl/graphics_linbsd.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/graphicsdriver/opengl/graphics_linbsd.go b/internal/graphicsdriver/opengl/graphics_linbsd.go index 37a690cd2..f61774705 100644 --- a/internal/graphicsdriver/opengl/graphics_linbsd.go +++ b/internal/graphicsdriver/opengl/graphics_linbsd.go @@ -43,19 +43,19 @@ func isGLXExtensionForGL2Available() bool { var listingExtensions bool s := bufio.NewScanner(&buf) for s.Scan() { + line := s.Text() if !listingExtensions { - if s.Text() == "GLX extensions:" { + if line == "GLX extensions:" { listingExtensions = true } continue } - if !strings.HasPrefix(s.Text(), indent) { + if !strings.HasPrefix(line, indent) { listingExtensions = false break } - line := s.Text() for len(line) > 0 { head, tail, _ := strings.Cut(line, ",") if strings.TrimSpace(head) == ext {