Added build flag to switch to Allegro backend.

Added logs that print which backend is used.
This commit is contained in:
Sander Schobers 2020-05-23 11:08:50 +02:00
parent 822d8ab584
commit 855db3375c
3 changed files with 26 additions and 3 deletions

View File

@ -12,9 +12,6 @@ import (
"opslag.de/schobers/zntg/play" "opslag.de/schobers/zntg/play"
"opslag.de/schobers/zntg/ui" "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" rice "github.com/GeertJohan/go.rice"
"github.com/veandco/go-sdl2/sdl" "github.com/veandco/go-sdl2/sdl"
"opslag.de/schobers/tins2020" "opslag.de/schobers/tins2020"

View 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")
}

View 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")
}