Hid console window for Windows Allegro builds.
Removed explicit SDL dependency in game.
This commit is contained in:
parent
93002a784b
commit
bd1d685c20
@ -12,7 +12,6 @@ import (
|
|||||||
"opslag.de/schobers/zntg/ui"
|
"opslag.de/schobers/zntg/ui"
|
||||||
|
|
||||||
rice "github.com/GeertJohan/go.rice"
|
rice "github.com/GeertJohan/go.rice"
|
||||||
"github.com/veandco/go-sdl2/sdl"
|
|
||||||
"opslag.de/schobers/tins2020"
|
"opslag.de/schobers/tins2020"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -135,8 +134,9 @@ func run() error {
|
|||||||
}
|
}
|
||||||
defer settings.Store()
|
defer settings.Store()
|
||||||
|
|
||||||
if settings.Window.Location == nil {
|
var location *geom.PointF32
|
||||||
settings.Window.Location = ptPtr(sdl.WINDOWPOS_UNDEFINED, sdl.WINDOWPOS_UNDEFINED)
|
if settings.Window.Location != nil {
|
||||||
|
location = &geom.PointF32{X: float32(settings.Window.Location.X), Y: float32(settings.Window.Location.Y)}
|
||||||
}
|
}
|
||||||
if settings.Window.Size == nil {
|
if settings.Window.Size == nil {
|
||||||
settings.Window.Size = ptPtr(800, 600)
|
settings.Window.Size = ptPtr(800, 600)
|
||||||
@ -146,7 +146,7 @@ func run() error {
|
|||||||
settings.Window.VSync = &vsync
|
settings.Window.VSync = &vsync
|
||||||
}
|
}
|
||||||
renderer, err := ui.NewRenderer("Botanim - TINS 2020", settings.Window.Size.X, settings.Window.Size.Y, ui.NewRendererOptions{
|
renderer, err := ui.NewRenderer("Botanim - TINS 2020", settings.Window.Size.X, settings.Window.Size.Y, ui.NewRendererOptions{
|
||||||
Location: &geom.PointF32{X: float32(settings.Window.Location.X), Y: float32(settings.Window.Location.Y)},
|
Location: location,
|
||||||
Resizable: true,
|
Resizable: true,
|
||||||
VSync: *settings.Window.VSync,
|
VSync: *settings.Window.VSync,
|
||||||
})
|
})
|
||||||
|
6
cmd/tins2020/tins2020_windows_allegro.go
Normal file
6
cmd/tins2020/tins2020_windows_allegro.go
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
// +build windows,allegro
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
// #cgo LDFLAGS: -Wl,-subsystem,windows
|
||||||
|
import "C"
|
Loading…
Reference in New Issue
Block a user