Documentation
¶
Index ¶
- Constants
- 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) LaunchMedia(cfg *config.Instance, path string, launcher *platforms.Launcher, ...) error
- func (p *Platform) Launchers(cfg *config.Instance) []platforms.Launcher
- func (p *Platform) ReturnToMenu() error
- func (*Platform) RootDirs(cfg *config.Instance) []string
- func (*Platform) Settings() platforms.Settings
- func (p *Platform) StartPost(ctx context.Context, cfg *config.Instance, ...) error
- func (p *Platform) StartPre(cfg *config.Instance) error
- func (p *Platform) Stop() error
- func (p *Platform) SupportedReaders(cfg *config.Instance) []readers.Reader
- type RetroDECKPaths
Constants ¶
const (
RetroArchFlatpakID = "org.libretro.RetroArch"
)
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
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
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) 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) 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) 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.
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.