emulator

package
v3.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AspectRatio

type AspectRatio struct {
	Keep   bool
	Width  int
	Height int
}

func (AspectRatio) ResizeToAspect

func (a AspectRatio) ResizeToAspect(ratio float64, sw int, sh int) (dw int, dh int)

type CoreInfo

type CoreInfo struct {
	Name    string
	AltRepo bool
}

type Emulator

type Emulator struct {
	Scale       int
	Threads     int
	AspectRatio AspectRatio
	Storage     string
	LocalPath   string
	Libretro    LibretroConfig
	AutosaveSec int
}

func (Emulator) GetEmulator

func (e Emulator) GetEmulator(rom string, path string) string

GetEmulator tries to find a suitable emulator. !to remove quadratic complexity

func (Emulator) GetLibretroCoreConfig

func (e Emulator) GetLibretroCoreConfig(emulator string) LibretroCoreConfig

GetLibretroCoreConfig returns a core config with expanded paths.

func (Emulator) GetSupportedExtensions

func (e Emulator) GetSupportedExtensions() []string

type LibretroConfig

type LibretroConfig struct {
	Cores struct {
		Paths struct {
			Libs string
		}
		Repo struct {
			Sync      bool
			ExtLock   string
			Main      LibretroRepoConfig
			Secondary LibretroRepoConfig
		}
		List map[string]LibretroCoreConfig
	}
	SaveCompression bool
	LogLevel        int
}

func (*LibretroConfig) GetCores

func (l *LibretroConfig) GetCores() (cores []CoreInfo)

func (*LibretroConfig) GetCoresStorePath

func (l *LibretroConfig) GetCoresStorePath() string

type LibretroCoreConfig

type LibretroCoreConfig struct {
	AltRepo       bool
	AutoGlContext bool // hack: keep it here to pass it down the emulator
	Folder        string
	HasMultitap   bool
	Height        int
	IsGlAllowed   bool
	Lib           string
	Options       map[string]string
	Roms          []string
	UsesLibCo     bool
	VFR           bool
	Width         int
}

type LibretroRepoConfig

type LibretroRepoConfig struct {
	Type        string
	Url         string
	Compression string
}

Jump to

Keyboard shortcuts

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