start cleanup
This commit is contained in:
parent
7c377aa79b
commit
c715f42c71
12
main.go
12
main.go
|
@ -17,13 +17,16 @@ import (
|
|||
)
|
||||
|
||||
func main() {
|
||||
if err := sdl.Init(sdl.INIT_EVERYTHING); err != nil {
|
||||
windowWidth := 800
|
||||
windowHeight := 600
|
||||
|
||||
err := sdl.Init(sdl.INIT_VIDEO)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer sdl.Quit()
|
||||
|
||||
window, err := sdl.CreateWindow("milkbucket", sdl.WINDOWPOS_UNDEFINED, sdl.WINDOWPOS_UNDEFINED,
|
||||
800, 600, sdl.WINDOW_OPENGL)
|
||||
window, err := sdl.CreateWindow("milkbucket", sdl.WINDOWPOS_UNDEFINED, sdl.WINDOWPOS_UNDEFINED, int32(windowWidth), int32(windowHeight), sdl.WINDOW_OPENGL)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
@ -41,7 +44,7 @@ func main() {
|
|||
}
|
||||
defer C.projectm_destroy(handle)
|
||||
|
||||
C.projectm_set_window_size(handle, 800, 600)
|
||||
C.projectm_set_window_size(handle, C.ulong(windowWidth), C.ulong(windowHeight))
|
||||
|
||||
preset := C.CString("/usr/share/projectM/presets/presets_stock/Zylot - Wisps.milk")
|
||||
C.projectm_load_preset_file(handle, preset, false)
|
||||
|
@ -53,7 +56,6 @@ func main() {
|
|||
for event := sdl.PollEvent(); event != nil; event = sdl.PollEvent() {
|
||||
switch event.(type) {
|
||||
case *sdl.QuitEvent:
|
||||
println("Quit")
|
||||
running = false
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue