config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const CONFIG_PATH = "./config.toml"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Fullscreen       bool `toml:"fullscreen"`
	TomlBackdrop     int  `toml:"backdrop_color"`
	GamesPerRow      int  `toml:"games_per_row"`
	Backdrop         color.Color
	CancelAudioInit  bool             `toml:"cancel_audio_init"`
	Gb               GbConfig         `toml:"gb"`
	Gba              GbaConfig        `toml:"gba"`
	KeyboardConfig   KeyboardConfig   `toml:"keyboard"`
	ControllerConfig ControllerConfig `toml:"controller"`
}
var Conf Config

func (*Config) Decode

func (c *Config) Decode()

type ControllerConfig

type ControllerConfig struct {
	Select     []int `toml:"select"`
	Mute       []int `toml:"mute"`
	Pause      []int `toml:"pause"`
	Left       []int `toml:"left"`
	Right      []int `toml:"right"`
	Up         []int `toml:"up"`
	Down       []int `toml:"down"`
	Fullscreen []int `toml:"fullscreen"`
	Quit       []int `toml:"quit"`
}

type EmulatorControllerConfig

type EmulatorControllerConfig struct {
	A      []int `toml:"a"`
	B      []int `toml:"b"`
	Select []int `toml:"select"`
	Start  []int `toml:"start"`
	Left   []int `toml:"left"`
	Right  []int `toml:"right"`
	Up     []int `toml:"up"`
	Down   []int `toml:"down"`
	R      []int `toml:"r"`
	L      []int `toml:"l"`
}

type EmulatorKeyboardConfig

type EmulatorKeyboardConfig struct {
	A      []string `toml:"a"`
	B      []string `toml:"b"`
	Select []string `toml:"select"`
	Start  []string `toml:"start"`
	Left   []string `toml:"left"`
	Right  []string `toml:"right"`
	Up     []string `toml:"up"`
	Down   []string `toml:"down"`
	R      []string `toml:"r"`
	L      []string `toml:"l"`
}

type GbConfig

type GbConfig struct {
	TomlPalette      []int `toml:"dmg_palette"`
	Palette          [][]uint8
	KeyboardConfig   EmulatorKeyboardConfig   `toml:"keyboard"`
	ControllerConfig EmulatorControllerConfig `toml:"controller"`
}

type GbaConfig

type GbaConfig struct {
	KeyboardConfig   EmulatorKeyboardConfig   `toml:"keyboard"`
	ControllerConfig EmulatorControllerConfig `toml:"controller"`

	SkipHle                bool `toml:"skip_hle"`
	Threads                int  `toml:"threads"`
	IdleOptimize           bool `toml:"idle_optimize"`
	SoundClockUpdateCycles int  `toml:"sound_clock_update_cycles"`
	DisableSaves           bool `toml:"disable_saves"`
}

type KeyboardConfig

type KeyboardConfig struct {
	Select     []string `toml:"select"`
	Mute       []string `toml:"mute"`
	Pause      []string `toml:"pause"`
	Left       []string `toml:"left"`
	Right      []string `toml:"right"`
	Up         []string `toml:"up"`
	Down       []string `toml:"down"`
	Fullscreen []string `toml:"fullscreen"`
	Quit       []string `toml:"quit"`
}

Jump to

Keyboard shortcuts

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