Documentation ¶
Index ¶
- Constants
- func Init(localPath string)
- func LoadGame(path string) error
- func SetLibretroLogger(log *logger.Logger)
- type ArchInfo
- type Frontend
- func (f *Frontend) Close()
- func (f *Frontend) GetAudio() func(*emulator.GameAudio)
- func (f *Frontend) GetFps() uint
- func (f *Frontend) GetFrameSize() (int, int)
- func (f *Frontend) GetHashPath() string
- func (f *Frontend) GetSRAMPath() string
- func (f *Frontend) GetSampleRate() uint
- func (f *Frontend) GetVideo() func(*emulator.GameFrame)
- func (f *Frontend) HasVerticalFrame() bool
- func (f *Frontend) Input(player int, data []byte)
- func (f *Frontend) Load() error
- func (f *Frontend) LoadGame(path string) error
- func (f *Frontend) LoadGameState() error
- func (f *Frontend) LoadMetadata(emu string)
- func (f *Frontend) Save() error
- func (f *Frontend) SaveGameState() error
- func (f *Frontend) SetAudio(ff func(*emulator.GameAudio))
- func (f *Frontend) SetMainSaveName(name string)
- func (f *Frontend) SetVideo(ff func(*emulator.GameFrame))
- func (f *Frontend) SetViewport(width int, height int)
- func (f *Frontend) Start()
- func (f *Frontend) ToggleMultitap()
- type InputState
- type State
- type StateStorage
- type Storage
- type ZipStorage
Constants ¶
View Source
const ( KeyPressed = 1 KeyReleased = 0 )
View Source
const ( CallSerialize = 1 CallUnserialize = 2 )
Variables ¶
This section is empty.
Functions ¶
func SetLibretroLogger ¶
Types ¶
type ArchInfo ¶
type ArchInfo struct { // bottom: x86_64, x86, ... Arch string // middle: windows, ios, ... Os string // top level: apple, nintendo, ... Vendor string // platform dependent library file extension (dot-prefixed) LibExt string }
ArchInfo contains Libretro core lib platform info. And cores are just C-compiled libraries. See: https://buildbot.libretro.com/nightly.
func GetCoreExt ¶
type Frontend ¶
type Frontend struct {
// contains filtered or unexported fields
}
func NewFrontend ¶
NewFrontend implements Emulator interface for a Libretro frontend.
func (*Frontend) GetFrameSize ¶
func (*Frontend) GetHashPath ¶
func (*Frontend) GetSRAMPath ¶
func (*Frontend) GetSampleRate ¶
func (*Frontend) HasVerticalFrame ¶
func (*Frontend) LoadGameState ¶
func (*Frontend) LoadMetadata ¶
func (*Frontend) SaveGameState ¶
func (*Frontend) SetMainSaveName ¶
func (*Frontend) SetViewport ¶
func (*Frontend) ToggleMultitap ¶
func (f *Frontend) ToggleMultitap()
type InputState ¶
type InputState [maxPort]State
InputState stores full controller state. It consists of:
- uint16 button values
- int16 analog stick values
func NewGameSessionInput ¶
func NewGameSessionInput() InputState
type State ¶
type State struct {
// contains filtered or unexported fields
}
InputState stores full controller state. It consists of:
- uint16 button values
- int16 analog stick values
type StateStorage ¶
type StateStorage struct { // save path without the dir slash in the end Path string // contains the name of the main save file // e.g. abc<...>293.dat // needed for Google Cloud save/restore which // doesn't support multiple files MainSave string }
func (*StateStorage) GetSRAMPath ¶
func (s *StateStorage) GetSRAMPath() string
func (*StateStorage) GetSavePath ¶
func (s *StateStorage) GetSavePath() string
func (*StateStorage) SetMainSaveName ¶
func (s *StateStorage) SetMainSaveName(name string)
type ZipStorage ¶
type ZipStorage struct {
Storage
}
func (*ZipStorage) GetSRAMPath ¶
func (z *ZipStorage) GetSRAMPath() string
func (*ZipStorage) GetSavePath ¶
func (z *ZipStorage) GetSavePath() string
Click to show internal directories.
Click to hide internal directories.