Added build flag to switch to Allegro backend.
Added logs that print which backend is used.
This commit is contained in:
parent
822d8ab584
commit
855db3375c
@ -12,9 +12,6 @@ import (
|
||||
"opslag.de/schobers/zntg/play"
|
||||
"opslag.de/schobers/zntg/ui"
|
||||
|
||||
_ "opslag.de/schobers/zntg/sdlui" // rendering backend
|
||||
// _ "opslag.de/schobers/zntg/allg5ui" // rendering backend
|
||||
|
||||
rice "github.com/GeertJohan/go.rice"
|
||||
"github.com/veandco/go-sdl2/sdl"
|
||||
"opslag.de/schobers/tins2020"
|
||||
|
13
cmd/tins2020/tins2020_allegro.go
Normal file
13
cmd/tins2020/tins2020_allegro.go
Normal file
@ -0,0 +1,13 @@
|
||||
// +build allegro
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
_ "opslag.de/schobers/zntg/allg5ui" // rendering backend
|
||||
)
|
||||
|
||||
func init() {
|
||||
log.Println("Using Allegro5 rendering backend")
|
||||
}
|
13
cmd/tins2020/tins2020_sdl.go
Normal file
13
cmd/tins2020/tins2020_sdl.go
Normal file
@ -0,0 +1,13 @@
|
||||
// +build !allegro
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
_ "opslag.de/schobers/zntg/sdlui" // SDL rendering backend
|
||||
)
|
||||
|
||||
func init() {
|
||||
log.Println("Using SDL rendering backend")
|
||||
}
|
Loading…
Reference in New Issue
Block a user