SDL2 and CHIP-8-emulator [SOLVED]

Hi guys. I’m very new to golang. I want to build this https://github.com/massung/CHIP-8 from source in Windows 10/64 bits. I follow this https://github.com/veandco/go-sdl2 and when i build, the binary panics.

‘panic: Conflicting window flags specified
goroutine 1 [running, locked to thread]:
main.createWindow()
C:/Users/rsrim/go/src/github.com/massung/CHIP-8/main.go:217 +0x17d
main.main()
C:/Users/rsrim/go/src/github.com/massung/CHIP-8/main.go:173 +0x274’

Do you guys have any ideas ?
Thank you.

WINDOWPOS_CENTERED is not a valid sdl.CreateWindow flag. (see: https://wiki.libsdl.org/SDL_CreateWindow#flags)

I’m guessing https://github.com/massung/CHIP-8/blob/master/main.go#L212 should be

	flags := sdl.WINDOW_OPENGL

You are right my friend. I remove the flag and now works fine !!! :grinning:
Thank you.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.