Documentation
¶
Index ¶
- Constants
- func GetEmuDeckLaunchers(_ *config.Instance) []platforms.Launcher
- func GetRetroDECKLaunchers(_ *config.Instance) []platforms.Launcher
- func IsEmuDeckAvailable() bool
- func IsRetroDECKAvailable() bool
- func IsRetroDECKInstalled() bool
- func KnownEmulatorProcesses() []string
- func LaunchViaEmuDeck(ctx context.Context, romPath, systemFolder string) (*os.Process, error)
- 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 (*Platform) Settings() platforms.Settings
- func (p *Platform) StartPost(cfg *config.Instance, launcherManager platforms.LauncherContextManager, ...) error
- func (p *Platform) Stop() error
- func (p *Platform) SupportedReaders(cfg *config.Instance) []readers.Reader
- type RetroDECKPaths
Constants ¶
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
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
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
LaunchViaEmuDeck launches a game using the appropriate emulator. The context allows for cancellation during launch.
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
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 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 ¶
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) 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.
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. |