From 7f66e8058d866c3a5664b74828a83e4a3cbba600 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 22 Dec 2022 17:19:35 +0100 Subject: [PATCH] Documentation update. --- CHANGELOG.md | 1 + THEMES-DEV.md | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 043c63765..29daf7c74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -215,6 +215,7 @@ * Removed a lot of unnecessary applyTheme() calls when updating help prompts * Removed the last remnants of the PowerSaver * Removed the RetroPie ES sizing bug replication from TextListComponent for non-legacy theme sets +* Added checks for nonexistent navigation sounds in the theme configuration with fallback to the default sounds * Changed the opacity data type and functions from unsigned char to float throughout the codebase * Refactored the six gamelist classes into two new classes; GamelistBase and GamelistView * Rewrote the gamelist logic to handle an arbitrary amount of components per type and split the legacy code into a separate file diff --git a/THEMES-DEV.md b/THEMES-DEV.md index f4804a915..d07f7a112 100644 --- a/THEMES-DEV.md +++ b/THEMES-DEV.md @@ -240,9 +240,11 @@ emulationstation --debug --resolution 1280 720 Enforcement of a correct theme configuration is quite strict, and most errors will abort the theme loading, leading to an unthemed system. In each such situation the log output will be very clear of what happened, for instance: ``` -Jan 28 17:17:30 Error: ThemeData::parseElement(): "/home/myusername/.emulationstation/themes/mythemeset-DE/theme.xml": Property "origin" for element "image" has no value defined +Jan 28 17:17:30 Error: ThemeData::parseElement(): "/home/myusername/.emulationstation/themes/mythemeset-DE/theme.xml": Property "origin" for element "image" has no value defined (system "collections", theme "custom-collections") ``` +Note that an unthemed system means precisely that, the specific system where the error occured will be unthemed but not necessarily the entire theme set. The latter can still happen if the error is global such as a missing variable used by all XML files or an error in a file included by all XML files. The approach is to only untheme relevant sections of the theme set to be able to pinpoint precisely where the problem lies. + Sanitization for valid data format and structure is done in this manner, but verification that property values are actually correct (or reasonable) is handled by the individual component that takes care of creating and rendering the specific theme element. What happens in many instances is that a warning log entry is created and the invalid property is reset to its default value. So for these situations, the system will not become unthemed. Here's an example where a badges element accidentally had its horizontalAlignment property set to _leftr_ instead of _left_: ``` Jan 28 17:25:27 Warn: BadgeComponent: Invalid theme configuration, property "horizontalAlignment" for element "gamelist_badges" defined as "leftr"