Skip to content

Commit

Permalink
internal/graphicsdriver/opengl: refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Nov 7, 2024
1 parent 4be626f commit b6d539d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/graphicsdriver/opengl/graphics_linbsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b6d539d

Please sign in to comment.