Documentation
¶
Index ¶
- Constants
- func BackupDefinitions(home string) []platforms.BackupDefinition
- func GetRetroDECKLaunchers(_ *config.Instance) []platforms.Launcher
- func IsEmuDeckAvailable() bool
- func IsRetroDECKAvailable() bool
- func IsRetroDECKInstalled() bool
- func KnownEmulatorProcesses() []string
- func LaunchViaRetroDECK(ctx context.Context, romPath string) (*os.Process, error)
- type EmuDeckPaths
- type EmulatorConfig
- type EmulatorProcess
- type EmulatorStartCallback
- type EmulatorStopCallback
- type EmulatorTracker
- type EmulatorType
- type Platform
- func (p *Platform) BackupDefinitions() []platforms.BackupDefinition
- func (p *Platform) BackupPlan() platforms.BackupPlan
- func (*Platform) BackupRestoreRoot() string
- func (p *Platform) ClearTrackedProcessMedia(proc *os.Process) bool
- func (p *Platform) LaunchMedia(cfg *config.Instance, path string, launcher *platforms.Launcher, ...) error
- func (p *Platform) Launchers(cfg *config.Instance) []platforms.Launcher
- func (*Platform) PrepareBackupRestore() (func(bool) error, error)
- func (p *Platform) ReturnToMenu() error
- func (*Platform) RootDirs(cfg *config.Instance) []string
- func (p *Platform) SetTrackedProcess(proc *os.Process)
- func (*Platform) Settings() platforms.Settings
- func (p *Platform) StartPost(ctx context.Context, cfg *config.Instance, ...) error
- func (p *Platform) Stop() error
- func (p *Platform) StopActiveLauncher(intent platforms.StopIntent) error
- func (p *Platform) SupportedReaders(cfg *config.Instance) []readers.Reader
- func (p *Platform) WaitTrackedProcess(proc *os.Process) error
- type RetroDECKPaths
Constants ¶
const (
RetroArchFlatpakID = "org.libretro.RetroArch"
)
const ( // RetroDECKFlatpakID is the Flatpak application ID for RetroDECK. RetroDECKFlatpakID = linuxemu.RetroDECKFlatpakID )
Variables ¶
This section is empty.
Functions ¶
func BackupDefinitions ¶ added in v2.17.0
func BackupDefinitions(home string) []platforms.BackupDefinition
BackupDefinitions returns SteamOS restore policy rooted at home.
func GetRetroDECKLaunchers ¶ added in v2.8.0
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.
Types ¶
type EmuDeckPaths ¶ added in v2.8.0
type EmuDeckPaths = linuxemu.EmuDeckPaths
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
EmulatorProcess represents a detected emulator process.
type EmulatorStartCallback ¶ added in v2.8.0
EmulatorStartCallback is called when an emulator process is detected.
type EmulatorStopCallback ¶ added in v2.8.0
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 ¶
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) BackupDefinitions ¶ added in v2.17.0
func (p *Platform) BackupDefinitions() []platforms.BackupDefinition
BackupDefinitions returns the restore allow-list. Dynamic provider mappings are listed before narrow compatibility fallbacks so configured external roots win when they are available on the destination.
func (*Platform) BackupPlan ¶ added in v2.17.0
func (p *Platform) BackupPlan() platforms.BackupPlan
BackupPlan walks only durable roots and discovered non-Steam prefixes. Broad compatibility definitions are restore-only and never traversed for backup.
func (*Platform) BackupRestoreRoot ¶ added in v2.17.0
BackupRestoreRoot is the fallback for legacy definitions. SteamOS definitions use explicit restore targets so custom provider roots and category symlinks restore to the destination installation's active paths.
func (*Platform) ClearTrackedProcessMedia ¶ added in v2.17.0
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 ¶
Launchers returns the available launchers for SteamOS. SteamOS uses direct steam command (not xdg-open) for better Game Mode integration.
func (*Platform) PrepareBackupRestore ¶ added in v2.17.0
PrepareBackupRestore preserves destination storage mappings while restoring provider settings. Data follows the destination's active roots rather than stale absolute paths captured on another device.
func (*Platform) ReturnToMenu ¶ added in v2.7.0
ReturnToMenu stops active media on SteamOS. Steam's Game Mode shell remains responsible for presenting its menu.
func (*Platform) SetTrackedProcess ¶ added in v2.6.1
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) StopActiveLauncher ¶
func (p *Platform) StopActiveLauncher(intent platforms.StopIntent) error
func (*Platform) SupportedReaders ¶
SupportedReaders returns the list of enabled readers for SteamOS.
type RetroDECKPaths ¶ added in v2.8.0
type RetroDECKPaths = linuxemu.RetroDECKPaths
RetroDECKPaths holds the paths for RetroDECK installation.
func DefaultRetroDECKPaths ¶ added in v2.8.0
func DefaultRetroDECKPaths() RetroDECKPaths
DefaultRetroDECKPaths returns the default paths for RetroDECK.