ConfigData

This class holds app configuration information from RetroHub. This is not directly accessible from themes, and instead passed on through the config_ready and config_updated signals.

Constants

Type

Name

String

KEY_CONFIG_VERSION

String

KEY_IS_FIRST_TIME

String

KEY_GAMES_DIR

String

KEY_CURRENT_THEME

String

KEY_LANG

String

KEY_FULLSCREEN

String

KEY_VSYNC

String

KEY_RENDER_RESOLUTION

String

KEY_REGION

String

KEY_RATING_SYSTEM

String

KEY_DATE_FORMAT

String

KEY_SYSTEM_NAMES

String

KEY_SCRAPER_HASH_FILE_SIZE

String

KEY_SCRAPER_SS_USE_CUSTOM_ACCOUNT

String

KEY_SCRAPER_SS_MAX_THREADS

String

KEY_CUSTOM_INPUT_REMAP

String

KEY_INPUT_KEY_MAP

String

KEY_INPUT_CONTROLLER_MAP

String

KEY_INPUT_CONTROLLER_MAIN_AXIS

String

KEY_INPUT_CONTROLLER_SECONDARY_AXIS

String

KEY_INPUT_CONTROLLER_ICON_TYPE

String

KEY_INPUT_CONTROLLER_ECHO_PRE_DELAY

String

KEY_INPUT_CONTROLLER_ECHO_DELAY

String

KEY_VIRTUAL_KEYBOARD_LAYOUT

String

KEY_VIRTUAL_KEYBOARD_TYPE

String

KEY_VIRTUAL_KEYBOARD_SHOW_ON_CONTROLLER

String

KEY_VIRTUAL_KEYBOARD_SHOW_ON_MOUSE

bool

KEY_ACCESSIBILITY_SCREEN_READER_ENABLED

String

KEY_CUSTOM_GAMEMEDIA_DIR

String

KEY_UI_VOLUME

String

KEY_INTEGRATION_RCHEEVOS_ENABLED


String KEY_CONFIG_VERSION = "config_version"

Key for the config_version property.


String KEY_IS_FIRST_TIME = "is_first_time"

Key for the is_first_time property.


String KEY_GAMES_DIR = "games_dir"

Key for the games_dir property.


String KEY_CURRENT_THEME = "current_theme"

Key for the current_theme property.


String KEY_LANG = "lang"

Key for the lang property.


String KEY_FULLSCREEN = "fullscreen"

Key for the fullscreen property.


String KEY_VSYNC = "vsync"

Key for the vsync property.


String KEY_RENDER_RESOLUTION = "render_resolution"

Key for the render_resolution property.


String KEY_REGION = "region"

Key for the region property.


String KEY_RATING_SYSTEM = "rating_system"

Key for the rating_system property.


String KEY_DATE_FORMAT = "date_format"

Key for the date_format property.


String KEY_SYSTEM_NAMES = "system_names"

Key for the system_names property.


String KEY_SCRAPER_HASH_FILE_SIZE = "scraper_hash_file_size"

Key for the scraper_hash_file_size property.


String KEY_SCRAPER_SS_USE_CUSTOM_ACCOUNT = "scraper_ss_use_custom_account"

Key for the scraper_ss_use_custom_account property.


String KEY_SCRAPER_SS_MAX_THREADS = "scraper_ss_max_threads"

Key for the scraper_ss_max_threads property.


String KEY_CUSTOM_INPUT_REMAP = "custom_input_remap"

Key for the custom_input_remap property.


String KEY_INPUT_KEY_MAP = "input_key_map"

Key for the input_key_map property.


String KEY_INPUT_CONTROLLER_MAP = "input_controller_map"

Key for the input_controller_map property.


String KEY_INPUT_CONTROLLER_MAIN_AXIS = "input_controller_main_axis"

Key for the input_controller_main_axis property.


String KEY_INPUT_CONTROLLER_SECONDARY_AXIS = "input_controller_secondary_axis"

Key for the input_controller_secondary_axis property.


String KEY_INPUT_CONTROLLER_ICON_TYPE = "input_controller_icon_type"

Key for the input_controller_icon_type property.


String KEY_INPUT_CONTROLLER_ECHO_PRE_DELAY = "input_controller_echo_pre_delay"

Key for the input_controller_echo_pre_delay property.


String KEY_INPUT_CONTROLLER_ECHO_DELAY = "input_controller_echo_delay"

Key for the input_controller_echo_delay property.


String KEY_VIRTUAL_KEYBOARD_LAYOUT = "virtual_keyboard_layout"

Key for the virtual_keyboard_layout property.


String KEY_VIRTUAL_KEYBOARD_TYPE = "virtual_keyboard_type"

Key for the virtual_keyboard_type property.


String KEY_VIRTUAL_KEYBOARD_SHOW_ON_CONTROLLER = "virtual_keyboard_show_on_controller"

Key for the virtual_keyboard_show_on_controller property.


String KEY_VIRTUAL_KEYBOARD_SHOW_ON_MOUSE = "virtual_keyboard_show_on_mouse"

Key for the virtual_keyboard_show_on_mouse property.


String KEY_ACCESSIBILITY_SCREEN_READER_ENABLED = "accessibility_screen_reader_enabled"

Key for the accessibility_screen_reader_enabled property.


String KEY_CUSTOM_GAMEMEDIA_DIR = "custom_gamemedia_dir"

Key for the custom_gamemedia_dir property.


String KEY_UI_VOLUME = "ui_volume"

Key for the ui_volume property.


String KEY_INTEGRATION_RCHEEVOS_ENABLED = "integration_rcheevos_enabled"

Key for the integration_rcheevos_enabled property.

Properties

Type

Name

Default

int

config_version

1

bool

is_first_time

true

String

games_dir

FileUtils.get_home_dir() + "/ROMS"

String

current_theme

"default"

String

lang

"en"

bool

fullscreen

true

bool

vsync

true

int

render_resolution

100

String

region

"usa"

String

rating_system

"esrb"

String

date_format

"mm/dd/yyyy"

Dictionary

system_names

Dictionary

int

scraper_hash_file_size

64

bool

scraper_ss_use_custom_account

false

int

scraper_ss_max_threads

6

String

custom_input_remap

""

Dictionary

input_key_map

Dictionary

Dictionary

input_controller_map

Dictionary

int

input_controller_main_axis

JOY_ANALOG_LX

int

input_controller_secondary_axis

JOY_ANALOG_RX

int

input_controller_icon_type

0

float

input_controller_echo_pre_delay

0.75

float

input_controller_echo_delay

0.15

String

virtual_keyboard_layout

"qwerty"

String

virtual_keyboard_type

"builtin"

bool

virtual_keyboard_show_on_controller

true

bool

virtual_keyboard_show_on_mouse

false

bool

accessibility_screen_reader_enabled

false

String

custom_gamemedia_dir

""

int

ui_volume

100

bool

integration_rcheevos_enabled

false


int config_version = 1

Specifies the latest internal configuration version. This is used internally to determine if the configuration needs to be updated.


bool is_first_time = true

If true, this is the first time the user is running RetroHub, therefore the first-time wizard will be shown. Themes are not loaded until the first-time wizard is completed, so in practice this property is always false when queried by the theme.


String games_dir = FileUtils.get_home_dir() + "/ROMS"

The user’s game library. This is the directory where RetroHub will look for games.


String current_theme = "default"

The currently loaded theme. If lacking any extension, it will load a default theme at res://default_themes/{current_theme}.pck. Otherwise, the theme is loaded from <retrohub_config_dir>/themes/{current_theme}.


String lang = "en"

Language. Used throughout the UI and for themes that support localization as well.

Valid values:
  • "en": English


bool fullscreen = true

If true, RetroHub will run in fullscreen mode, otherwise it will run in windowed mode.


bool vsync = true

If true, RetroHub will enable V-Sync.


int render_resolution = 100

Theme render resolution, in percentage. Doesn’t affect RetroHub’s UI. Can range from 50 to 100.


String region = "usa"

User’s preferred region.

Valid values:
  • "usa": USA

  • "eur": Europe

  • "jpn": Japan


String rating_system = "esrb"

User’s preferred age rating system.

Valid values:
  • "esrb": ESRB

  • "pegi": PEGI

  • "cero": CERO


String date_format = "mm/dd/yyyy"

User’s preferred date formatting.

Valid values:
  • "mm/dd/yyyy": month / day / year

  • "dd/mm/yyyy": day / month / year

  • "yyyy/mm/dd": year / month / day


Dictionary system_names = Dictionary

Chosen system remaps per region. Each key determines the displayed name for the system.


int scraper_hash_file_size = 64

Maximum allowed size, in MB, of game files to be hashed for scraping. This is used to avoid scraping large files. Set to 0 to disable this limit.


bool scraper_ss_use_custom_account = false

If true, uses a user’s account details when using ScreenScraper. Used to bypass global API quota limits.


int scraper_ss_max_threads = 6

Maximum amount of threads to use when scraping with ScreenScraper with a custom account. Set this to limit thread usage to a specific number.

Note

RetroHub will always check how many threads your account has available. If this value is bigger than your allowed thread count, RetroHub will respect your account’s thread limit.


String custom_input_remap = ""

Custom controller layout string. This follows the SDL format. See Controller Layouts for more information.


Dictionary input_key_map = Dictionary

Input map for keyboard actions. Keys are RetroHub’s input actions, available on Input actions. Values are KEY_* constants available in @GlobalScope.


Dictionary input_controller_map = Dictionary

Input map for controller actions. Keys are RetroHub’s input actions, available on Input actions. Values are JOY_* constants available in @GlobalScope.


int input_controller_main_axis = JOY_ANALOG_LX

Main joystick axis for controller input. This is used for navigation.

Valid values:
  • JOY_ANALOG_LX: Left stick

  • JOY_ANALOG_RX: Right stick


int input_controller_secondary_axis = JOY_ANALOG_RX

Secondary joystick axis for controller input. This is used for scrolling.

Valid values:
  • JOY_ANALOG_LX: Left stick

  • JOY_ANALOG_RX: Right stick


int input_controller_icon_type = 0

Type of controller icons.

Valid values:
  • 0: Detect controller automatically

  • 1: Xbox 360

  • 2: Xbox One

  • 3: Xbox Series

  • 4: PS3

  • 5: PS4

  • 6: PS5

  • 7: Switch (Controller)

  • 8: Switch (Joy-Con)

  • 9: Steam Controller

  • 10: Steam Deck

  • 11: Amazon Luna

  • 12: Google Stadia


float input_controller_echo_pre_delay = 0.75

Pre-delay in seconds for controller echo events. This is the amount of time a user has to keep a button pressed/axis moved before it starts repeating.


float input_controller_echo_delay = 0.15

Delay in seconds between controller echo events. This dictactes the frequency of controller echo events.


String virtual_keyboard_layout = "qwerty"

Preferred virtual keyboard layout.

Valid values:
  • "qwerty": QWERTY

  • "qwertz": QWERTZ

  • "azerty": AZERTY


String virtual_keyboard_type = "builtin"

What virtual keyboard to use.

Valid values:
  • "builtin": App built-in virtual keyboard

  • "steam": Steam/Steam Deck virtual keyboard


bool virtual_keyboard_show_on_controller = true

If true, shows the virtual keyboard when a controller is connected and a given valid node is selected with action-joy: rh_accept.


bool virtual_keyboard_show_on_mouse = false

If true, shows the virtual keyboard when a mouse click or touch event is done on a valid node.


bool accessibility_screen_reader_enabled = false

If true, enables screen reader support.


String custom_gamemedia_dir = ""

If specificed, stores downloaded media files separately from the main configuration directory, on a user specified path.


int ui_volume = 100

UI volume, in percentage. Can range from 0 to 100.


bool integration_rcheevos_enabled = false

If true, enables RetroHub’s integration with the RetroAchievements service.