linuxemu

package
v2.17.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Overview

Package linuxemu provides reusable emulator discovery and launchers for Linux-family platforms.

Index

Constants

View Source
const (
	RetroArchFlatpakID   = "org.libretro.RetroArch"
	RetroArchNetworkAddr = "127.0.0.1:55355"
)
View Source
const RetroDECKFlatpakID = "net.retrodeck.retrodeck"

Variables

This section is empty.

Functions

func AttachPlainESDEScanners

func AttachPlainESDEScanners(cfg *config.Instance, options Options, catalog []platforms.Launcher)

AttachPlainESDEScanners enriches filesystem results from explicit index roots using standard ~/ES-DE/gamelists metadata. It never adds or scans roots.

func DesktopRetroArchConfigPath

func DesktopRetroArchConfigPath() string

DesktopRetroArchConfigPath returns the shared Linux desktop network-command overlay path.

func DesktopRetroArchOptions

func DesktopRetroArchOptions(appendConfigPath string) sharedretroarch.Options

DesktopRetroArchOptions builds standard Flatpak RetroArch options for Linux desktops.

func EnsureRetroArchNetworkConfig

func EnsureRetroArchNetworkConfig(path string) error

EnsureRetroArchNetworkConfig writes the shared network-command overlay.

func KnownEmulatorProcesses

func KnownEmulatorProcesses() []string

KnownEmulatorProcesses returns the monitored process-name catalog.

func Launchers

func Launchers(cfg *config.Instance, options Options, existing []platforms.Launcher) []platforms.Launcher

Launchers discovers emulator integrations whose required applications and directories currently exist. IDs already present in existing are suppressed.

Types

type EmuDeckPaths

type EmuDeckPaths struct {
	RomsPath     string
	GamelistPath string
}

EmuDeckPaths holds discovered EmuDeck library paths.

func DefaultEmuDeckPaths

func DefaultEmuDeckPaths(homeDir string) EmuDeckPaths

DefaultEmuDeckPaths discovers EmuDeck's configured ROM root and standard ES-DE gamelist directory without executing its shell settings file.

type EmulatorProcess

type EmulatorProcess struct {
	Name    string
	Cmdline string
	PID     int
}

EmulatorProcess describes one detected emulator process.

type EmulatorStartCallback

type EmulatorStartCallback func(name string, pid int, cmdline string)

EmulatorStartCallback is called when an emulator process is detected.

type EmulatorStopCallback

type EmulatorStopCallback func(name string, pid int)

EmulatorStopCallback is called when an emulator process exits.

type EmulatorTracker

type EmulatorTracker struct {
	// contains filtered or unexported fields
}

EmulatorTracker monitors emulator process lifecycle through a shared scanner.

func NewEmulatorTracker

func NewEmulatorTracker(
	scanner *procscanner.Scanner,
	onStart EmulatorStartCallback,
	onStop EmulatorStopCallback,
) *EmulatorTracker

NewEmulatorTracker creates a tracker using a running process scanner.

func (*EmulatorTracker) Start

func (t *EmulatorTracker) Start()

Start begins process monitoring.

func (*EmulatorTracker) Stop

func (t *EmulatorTracker) Stop()

Stop ends process monitoring.

func (*EmulatorTracker) TrackedEmulators

func (t *EmulatorTracker) TrackedEmulators() []EmulatorProcess

TrackedEmulators returns a snapshot of active emulator processes.

type Options

type Options struct {
	RetroArch            *sharedretroarch.Options
	GameMode             *gamescope.Manager
	LaunchEnv            func() []string
	IsFlatpakInstalled   func(string) bool
	LookPath             func(string) (string, error)
	HomeDir              string
	IncludeRetroArch     bool
	IncludeStandalone    bool
	IncludeProviderDecks bool
}

Options parameterizes platform-specific Linux emulator behavior.

func DesktopEmulationOptions

func DesktopEmulationOptions(
	gameMode *gamescope.Manager,
	retroArch sharedretroarch.Options,
) Options

DesktopEmulationOptions applies shared desktop launch-environment wiring.

func NewOptions

func NewOptions(homeDir string, retroArch sharedretroarch.Options) Options

NewOptions returns defaults suitable for a desktop Linux platform.

type RetroDECKPaths

type RetroDECKPaths struct {
	RomsPath     string
	GamelistPath string
}

RetroDECKPaths holds discovered RetroDECK library paths.

func DefaultRetroDECKPaths

func DefaultRetroDECKPaths(homeDir string) RetroDECKPaths

DefaultRetroDECKPaths discovers RetroDECK's configurable userdata paths from its Flatpak JSON config, falling back to documented defaults.

Jump to

Keyboard shortcuts

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