mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-13 20:42:07 +01:00
ca8ee8e23b
Replace singular embedded controller database file with separate generated files for each supported platform. The controller database file is some ~500KB, so this change should reduce the overall binary size per platform.
23 lines
571 B
Smarty
23 lines
571 B
Smarty
{{.License}}
|
|
|
|
{{.DoNotEdit}}
|
|
|
|
{{.BuildTag}}
|
|
|
|
package gamepaddb
|
|
|
|
func init() {
|
|
if err := Update(controllerBytes); err != nil {
|
|
panic(err)
|
|
}
|
|
{{if eq .SDLPlatform "Windows" }}
|
|
if err := Update(glfwControllerBytes); err != nil {
|
|
panic(err)
|
|
}
|
|
{{end}}}
|
|
|
|
var controllerBytes = []byte{ {{ range $index, $element := .ControllerBytes }}{{ if $index }},{{ end }}{{ $element }}{{ end }} }
|
|
|
|
{{if eq .SDLPlatform "Windows" }}
|
|
var glfwControllerBytes = []byte{ {{ range $index, $element := .GLFWGamePads }}{{ if $index }},{{ end }}{{ $element }}{{ end }} }
|
|
{{end}} |