steamos

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: 23 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func GetEmuDeckLaunchers added in v2.8.0

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

GetEmuDeckLaunchers returns all available EmuDeck launchers. It scans the EmuDeck roms directory and creates a launcher for each system that has a configured emulator mapping.

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 checks if EmuDeck is installed by looking for the Emulation directory.

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 LaunchViaEmuDeck added in v2.8.0

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

LaunchViaEmuDeck launches a game using the appropriate emulator. The context allows for cancellation during launch.

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 is the base path for ROMs (e.g., ~/Emulation/roms/)
	RomsPath string
	// GamelistPath is the base path for ES-DE gamelists (e.g., ~/ES-DE/gamelists/)
	GamelistPath string
}

EmuDeckPaths holds the paths for EmuDeck installation.

func DefaultEmuDeckPaths added in v2.8.0

func DefaultEmuDeckPaths() EmuDeckPaths

DefaultEmuDeckPaths returns the default paths for EmuDeck.

type EmulatorConfig added in v2.8.0

type EmulatorConfig struct {
	// Type is the emulator type (retroarch or standalone)
	Type EmulatorType
	// FlatpakID is the Flatpak application ID (if installed via Flatpak)
	FlatpakID string
	// Core is the libretro core name (for RetroArch)
	Core string
	// Args are additional command-line arguments
	Args []string
}

EmulatorConfig defines how to launch games for a specific system.

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 the type of emulator used to launch games.

const (
	// EmulatorRetroArch uses RetroArch with a specific libretro core
	EmulatorRetroArch EmulatorType = "retroarch"
	// EmulatorStandalone uses a standalone emulator 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) Settings

func (*Platform) Settings() platforms.Settings

Settings returns XDG-based settings for SteamOS.

func (*Platform) StartPost

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

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

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.

Directories

Path Synopsis
Package gamescope provides utilities for integrating with Steam's Gaming Mode (gamescope compositor) to enable proper window focus for external applications.
Package gamescope provides utilities for integrating with Steam's Gaming Mode (gamescope compositor) to enable proper window focus for external applications.

Jump to

Keyboard shortcuts

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