batocera

package
v2.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2026 License: GPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ESConfigDir is the EmulationStation config directory on Batocera.
	ESConfigDir = "/userdata/system/configs/emulationstation"
	// ESSystemsConfigFile is the main ES systems config file.
	ESSystemsConfigFile = "es_systems.cfg"
	// ESSystemsOverlayPattern is the glob pattern for overlay config files.
	ESSystemsOverlayPattern = "es_systems_*.cfg"
)
View Source
const (
	// HomeDir is hardcoded because home in env is not set at the point which
	// the service file is called to start.
	HomeDir   = "/userdata/system"
	DataDir   = HomeDir + "/.local/share/" + config.AppName
	ConfigDir = HomeDir + "/.config/" + config.AppName
	LogDir    = DataDir + "/" + config.LogsDir
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ESSystem added in v2.9.0

type ESSystem struct {
	Name string `xml:"name"`
	Path string `xml:"path"`
}

ESSystem represents a single system entry from es_systems.cfg.

type ESSystemConfig added in v2.9.0

type ESSystemConfig struct {
	// Systems maps system name to its configuration.
	Systems map[string]ESSystem
}

ESSystemConfig holds parsed ES system configuration.

func ParseESSystemsConfig added in v2.9.0

func ParseESSystemsConfig(configDir string) (*ESSystemConfig, error)

ParseESSystemsConfig parses EmulationStation config files and returns discovered system configurations. It reads the main config file and any overlay files (es_systems_*.cfg).

func (*ESSystemConfig) GetROMPaths added in v2.9.0

func (c *ESSystemConfig) GetROMPaths() []string

GetROMPaths returns deduplicated ROM paths from parsed ES config. Paths are expanded (environment variables resolved) and normalized.

type ESSystemList added in v2.9.0

type ESSystemList struct {
	XMLName xml.Name   `xml:"systemList"`
	Systems []ESSystem `xml:"system"`
}

ESSystemList is the root element of es_systems.cfg.

type Platform

type Platform struct {
	shared.LinuxInput
	// contains filtered or unexported fields
}

func (*Platform) ConsoleManager added in v2.7.0

func (*Platform) ConsoleManager() platforms.ConsoleManager

func (*Platform) ForwardCmd

func (*Platform) ForwardCmd(env *platforms.CmdEnv) (platforms.CmdResult, error)

func (*Platform) ID

func (*Platform) ID() string

func (*Platform) LaunchMedia

func (p *Platform) LaunchMedia(
	cfg *config.Instance, path string, launcher *platforms.Launcher, db *database.Database,
	opts *platforms.LaunchOptions,
) error

func (*Platform) LaunchSystem

func (p *Platform) LaunchSystem(_ *config.Instance, systemID string) error

func (*Platform) Launchers

func (p *Platform) Launchers(cfg *config.Instance) []platforms.Launcher

func (*Platform) LookupMapping

func (*Platform) LookupMapping(_ *tokens.Token) (string, bool)

func (*Platform) ReturnToMenu added in v2.7.0

func (p *Platform) ReturnToMenu() error

func (*Platform) RootDirs

func (p *Platform) RootDirs(cfg *config.Instance) []string

func (*Platform) ScanHook

func (*Platform) ScanHook(_ *tokens.Token) error

func (*Platform) SetTrackedProcess added in v2.6.1

func (p *Platform) SetTrackedProcess(proc *os.Process)

func (*Platform) Settings

func (*Platform) Settings() platforms.Settings

func (*Platform) ShowLoader

func (*Platform) ShowLoader(
	_ *config.Instance,
	args widgetmodels.NoticeArgs,
) (func() error, error)

func (*Platform) ShowNotice

func (*Platform) ShowNotice(
	_ *config.Instance,
	args widgetmodels.NoticeArgs,
) (func() error, time.Duration, error)

func (*Platform) ShowPicker

func (*Platform) ShowPicker(
	_ *config.Instance,
	_ widgetmodels.PickerArgs,
) error

func (*Platform) StartPost

func (p *Platform) StartPost(
	cfg *config.Instance,
	_ platforms.LauncherContextManager,
	activeMedia func() *models.ActiveMedia,
	setActiveMedia func(*models.ActiveMedia),
	_ *database.Database,
) error

func (*Platform) StartPre

func (p *Platform) StartPre(cfg *config.Instance) error

func (*Platform) Stop

func (p *Platform) Stop() error

func (*Platform) StopActiveLauncher

func (p *Platform) StopActiveLauncher(reason platforms.StopIntent) error

func (*Platform) SupportedReaders

func (p *Platform) SupportedReaders(cfg *config.Instance) []readers.Reader

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL