steamos

package
v2.16.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	RetroArchFlatpakID = "org.libretro.RetroArch"
)
View Source
const (
	// RetroDECKFlatpakID is the Flatpak application ID for RetroDECK
	RetroDECKFlatpakID = "net.retrodeck.retrodeck"
)

Variables

This section is empty.

Functions

func GetRetroDECKLaunchers added in v2.8.0

func GetRetroDECKLaunchers(_ *config.Instance) []platforms.Launcher

GetRetroDECKLaunchers returns all available RetroDECK launchers. It scans the RetroDECK roms directory and creates a launcher for each recognized system folder.

func IsEmuDeckAvailable added in v2.8.0

func IsEmuDeckAvailable() bool

IsEmuDeckAvailable reports whether EmuDeck's ROM directory exists.

func IsRetroDECKAvailable added in v2.8.0

func IsRetroDECKAvailable() bool

IsRetroDECKAvailable checks if RetroDECK is installed and the roms directory exists.

func IsRetroDECKInstalled added in v2.8.0

func IsRetroDECKInstalled() bool

IsRetroDECKInstalled checks if RetroDECK is installed via Flatpak.

func KnownEmulatorProcesses added in v2.8.0

func KnownEmulatorProcesses() []string

KnownEmulatorProcesses returns the list of known emulator process names. This can be used for reference or extending the list via configuration.

func LaunchViaRetroDECK added in v2.8.0

func LaunchViaRetroDECK(ctx context.Context, romPath string) (*os.Process, error)

LaunchViaRetroDECK launches a game using RetroDECK's CLI. RetroDECK uses RetroENGINE which accepts a ROM path directly.

Types

type EmuDeckPaths added in v2.8.0

type EmuDeckPaths struct {
	RomsPath     string
	GamelistPath string
}

EmuDeckPaths holds EmuDeck library paths.

func DefaultEmuDeckPaths added in v2.8.0

func DefaultEmuDeckPaths() EmuDeckPaths

DefaultEmuDeckPaths returns standard EmuDeck paths.

type EmulatorConfig added in v2.8.0

type EmulatorConfig struct {
	Type      EmulatorType
	FlatpakID string
	Core      string
	Args      []string
}

EmulatorConfig defines an EmuDeck emulator invocation.

type EmulatorProcess added in v2.8.0

type EmulatorProcess struct {
	Name    string
	Cmdline string
	PID     int
}

EmulatorProcess represents a detected emulator process.

type EmulatorStartCallback added in v2.8.0

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

EmulatorStartCallback is called when an emulator process is detected.

type EmulatorStopCallback added in v2.8.0

type EmulatorStopCallback func(name string, pid int)

EmulatorStopCallback is called when an emulator process exits.

type EmulatorTracker added in v2.8.0

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

EmulatorTracker monitors emulator processes for game lifecycle tracking.

func NewEmulatorTracker added in v2.8.0

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

NewEmulatorTracker creates a new emulator process tracker. scanner must be a running process scanner.

func (*EmulatorTracker) Start added in v2.8.0

func (t *EmulatorTracker) Start()

Start begins monitoring for emulator processes.

func (*EmulatorTracker) Stop added in v2.8.0

func (t *EmulatorTracker) Stop()

Stop stops the emulator tracker.

func (*EmulatorTracker) TrackedEmulators added in v2.8.0

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

TrackedEmulators returns a copy of currently tracked emulators.

type EmulatorType added in v2.8.0

type EmulatorType string

EmulatorType represents an EmuDeck emulator integration type.

const (
	// EmulatorRetroArch uses RetroArch with a libretro core.
	EmulatorRetroArch EmulatorType = "retroarch"
	// EmulatorStandalone uses a standalone Flatpak application.
	EmulatorStandalone EmulatorType = "standalone"
)

type Platform

type Platform struct {
	*linuxbase.Base
	// contains filtered or unexported fields
}

Platform implements the SteamOS platform (Steam Deck and compatible handhelds). Uses console-first approach with direct steam command for Game Mode integration.

func NewPlatform added in v2.8.0

func NewPlatform() *Platform

NewPlatform creates a new SteamOS platform instance.

func (*Platform) LaunchMedia

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

LaunchMedia launches media using the appropriate launcher.

func (*Platform) Launchers

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

Launchers returns the available launchers for SteamOS. SteamOS uses direct steam command (not xdg-open) for better Game Mode integration.

func (*Platform) ReturnToMenu added in v2.7.0

func (p *Platform) ReturnToMenu() error

ReturnToMenu stops active media on SteamOS. Steam's Game Mode shell remains responsible for presenting its menu.

func (*Platform) RootDirs

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

RootDirs returns configured roots or the neutral ES-DE ROM root.

func (*Platform) Settings

func (*Platform) Settings() platforms.Settings

Settings returns XDG-based settings for SteamOS.

func (*Platform) StartPost

func (p *Platform) StartPost(
	ctx context.Context,
	cfg *config.Instance,
	launcherManager platforms.LauncherContextManager,
	activeMedia func() *models.ActiveMedia,
	setActiveMedia func(*models.ActiveMedia),
	db *database.Database,
	scheduler *idle.Scheduler,
) error

StartPost initializes the platform after service startup. Starts the game tracker to monitor Steam game lifecycle.

func (*Platform) StartPre

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

StartPre writes the Zaparoo-owned native RetroArch profile.

func (*Platform) Stop

func (p *Platform) Stop() error

Stop stops the platform and cleans up resources.

func (*Platform) SupportedReaders

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

SupportedReaders returns the list of enabled readers for SteamOS.

type RetroDECKPaths added in v2.8.0

type RetroDECKPaths struct {
	// RomsPath is the base path for ROMs (e.g., ~/retrodeck/roms/)
	RomsPath string
	// GamelistPath is the base path for ES-DE gamelists (e.g., ~/retrodeck/ES-DE/gamelists/)
	GamelistPath string
}

RetroDECKPaths holds the paths for RetroDECK installation.

func DefaultRetroDECKPaths added in v2.8.0

func DefaultRetroDECKPaths() RetroDECKPaths

DefaultRetroDECKPaths returns the default paths for RetroDECK.

Jump to

Keyboard shortcuts

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