Fixed an issue where the default helpsystem element was not displayed if there was no theme configuration for it

This commit is contained in:
Leon Styhre 2025-02-04 18:01:51 +01:00
parent e74e8decbb
commit 9c76882530
2 changed files with 15 additions and 3 deletions

View file

@ -514,7 +514,11 @@ void GamelistView::render(const glm::mat4& parentTrans)
std::vector<HelpPrompt> GamelistView::getHelpPrompts() std::vector<HelpPrompt> GamelistView::getHelpPrompts()
{ {
mWindow->passHelpComponents(&mHelpComponents); if (mHelpComponents.empty())
mWindow->passHelpComponents(nullptr);
else
mWindow->passHelpComponents(&mHelpComponents);
std::vector<HelpPrompt> prompts; std::vector<HelpPrompt> prompts;
if (Settings::getInstance()->getString("QuickSystemSelect") != "disabled") { if (Settings::getInstance()->getString("QuickSystemSelect") != "disabled") {

View file

@ -211,7 +211,11 @@ void SystemView::onThemeChanged(const std::shared_ptr<ThemeData>& /*theme*/)
std::vector<HelpPrompt> SystemView::getHelpPrompts() std::vector<HelpPrompt> SystemView::getHelpPrompts()
{ {
mWindow->passHelpComponents(&mSystemElements[mPrimary->getCursor()].helpComponents); if (mSystemElements[mPrimary->getCursor()].helpComponents.empty())
mWindow->passHelpComponents(nullptr);
else
mWindow->passHelpComponents(&mSystemElements[mPrimary->getCursor()].helpComponents);
std::vector<HelpPrompt> prompts; std::vector<HelpPrompt> prompts;
if (mCarousel != nullptr) { if (mCarousel != nullptr) {
@ -885,7 +889,11 @@ void SystemView::populate()
} }
} }
mWindow->passHelpComponents(&mSystemElements[mPrimary->getCursor()].helpComponents); if (mSystemElements[mPrimary->getCursor()].helpComponents.empty())
mWindow->passHelpComponents(nullptr);
else
mWindow->passHelpComponents(&mSystemElements[mPrimary->getCursor()].helpComponents);
mFadeTransitions = (static_cast<ViewTransitionAnimation>(Settings::getInstance()->getInt( mFadeTransitions = (static_cast<ViewTransitionAnimation>(Settings::getInstance()->getInt(
"TransitionsSystemToSystem")) == ViewTransitionAnimation::FADE); "TransitionsSystemToSystem")) == ViewTransitionAnimation::FADE);
} }