Documentation ¶
Index ¶
- Constants
- func ExitGame()
- func GetActiveCoreName() string
- func NfcMigration()
- func NormalizePath(cfg *config.UserConfig, path string) string
- func PlayFail(cfg *config.UserConfig)
- func PlaySuccess(cfg *config.UserConfig)
- func Setup(tr *Tracker) error
- func StartFileWatch(tr *Tracker) (*fsnotify.Watcher, error)
- func UpdateArcadeDb() (bool, error)
- func UserConfigToMrext(cfg *config.UserConfig) *mrextConfig.UserConfig
- type ArcadeDbEntry
- type GithubContentsItem
- type NameMapping
- type Service
- type ServiceArgs
- type ServiceEntry
- type Tracker
Constants ¶
View Source
const ( TempFolder = "/tmp/tapto" LogFile = TempFolder + "/tapto.log" DisableLaunchFile = TempFolder + "/tapto.disabled" SuccessSoundFile = TempFolder + "/success.wav" FailSoundFile = TempFolder + "/fail.wav" SocketFile = TempFolder + "/tapto.sock" PidFile = TempFolder + "/tapto.pid" MappingsFile = "/media/fat/nfc.csv" TokenReadFile = "/tmp/TOKENREAD" DbFile = mrextConfig.ScriptsConfigFolder + "/tapto/tapto.db" GamesDbFile = mrextConfig.ScriptsConfigFolder + "/tapto/games.db" ArcadeDbUrl = "https://api.github.com/repositories/521644036/contents/ArcadeDatabase_CSV" ArcadeDbFile = mrextConfig.ScriptsConfigFolder + "/tapto/ArcadeDatabase.csv" ScriptsFolder = mrextConfig.ScriptsFolder CmdInterface = "/dev/MiSTer_cmd" )
View Source
const ArcadeSystem = "Arcade"
Variables ¶
This section is empty.
Functions ¶
func GetActiveCoreName ¶
func GetActiveCoreName() string
func NfcMigration ¶
func NfcMigration()
NfcMigration migrates NFC app data and removes the old service.
func NormalizePath ¶
func NormalizePath(cfg *config.UserConfig, path string) string
func PlayFail ¶
func PlayFail(cfg *config.UserConfig)
func PlaySuccess ¶
func PlaySuccess(cfg *config.UserConfig)
func StartFileWatch ¶
StartFileWatch Start thread for monitoring changes to all files relating to core/game launches.
func UpdateArcadeDb ¶
func UserConfigToMrext ¶
func UserConfigToMrext(cfg *config.UserConfig) *mrextConfig.UserConfig
Types ¶
type ArcadeDbEntry ¶
type ArcadeDbEntry struct { Setname string `csv:"setname"` Name string `csv:"name"` Region string `csv:"region"` Version string `csv:"version"` Alternative string `csv:"alternative"` ParentTitle string `csv:"parent_title"` Platform string `csv:"platform"` Series string `csv:"series"` Homebrew string `csv:"homebrew"` Bootleg string `csv:"bootleg"` Year string `csv:"year"` Manufacturer string `csv:"manufacturer"` Category string `csv:"category"` Linebreak1 string `csv:"linebreak1"` Resolution string `csv:"resolution"` Flip string `csv:"flip"` Linebreak2 string `csv:"linebreak2"` Players string `csv:"players"` MoveInputs string `csv:"move_inputs"` SpecialControls string `csv:"special_controls"` NumButtons string `csv:"num_buttons"` }
func ReadArcadeDb ¶
func ReadArcadeDb() ([]ArcadeDbEntry, error)
type GithubContentsItem ¶
type GithubContentsItem struct { Name string `json:"name"` Path string `json:"path"` Sha string `json:"sha"` Size int `json:"size"` Url string `json:"url"` HtmlUrl string `json:"html_url"` GitUrl string `json:"git_url"` DownloadUrl string `json:"download_url"` Type string `json:"type"` Links struct { Self string `json:"self"` Git string `json:"git"` Html string `json:"html"` } `json:"_links"` }
type NameMapping ¶
type Service ¶
type Service struct { Name string // contains filtered or unexported fields }
func NewService ¶
func NewService(args ServiceArgs) (*Service, error)
func (*Service) ServiceHandler ¶
type ServiceArgs ¶
type ServiceArgs struct { Name string Entry ServiceEntry NoDaemon bool }
type ServiceEntry ¶
type Tracker ¶
type Tracker struct { Config *config.UserConfig ActiveCore string ActiveSystem string ActiveSystemName string ActiveGameId string ActiveGameName string ActiveGamePath string NameMap []NameMapping // contains filtered or unexported fields }
func NewTracker ¶
func NewTracker(cfg *config.UserConfig) (*Tracker, error)
func StartTracker ¶
func StartTracker(cfg config.UserConfig) (*Tracker, func() error, error)
func (*Tracker) LoadCore ¶
func (tr *Tracker) LoadCore()
LoadCore loads the current running core and set it as active.
func (*Tracker) LookupCoreName ¶
func (tr *Tracker) LookupCoreName(name string, path string) NameMapping
func (*Tracker) ReloadNameMap ¶
func (tr *Tracker) ReloadNameMap()
func (*Tracker) SetEventHook ¶
func (tr *Tracker) SetEventHook(hook *func())
Click to show internal directories.
Click to hide internal directories.