From e2374271f2919b77cb04c0d15569e5e47529d8e4 Mon Sep 17 00:00:00 2001 From: jrassa Date: Fri, 24 Feb 2017 23:19:29 -0500 Subject: [PATCH] don't enable video view if current theme doesn't support it --- es-app/src/views/ViewController.cpp | 4 +++- es-core/src/ThemeData.cpp | 5 +++++ es-core/src/ThemeData.h | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index d9093e8e1..ce29025e0 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -228,13 +228,15 @@ std::shared_ptr ViewController::getGameListView(SystemData* syste //if we didn't, make it, remember it, and return it std::shared_ptr view; + bool themeHasVideoView = system->getTheme()->hasView("video"); + //decide type bool detailed = false; bool video = false; std::vector files = system->getRootFolder()->getFilesRecursive(GAME | FOLDER); for(auto it = files.begin(); it != files.end(); it++) { - if(!(*it)->getVideoPath().empty()) + if(themeHasVideoView && !(*it)->getVideoPath().empty()) { video = true; break; diff --git a/es-core/src/ThemeData.cpp b/es-core/src/ThemeData.cpp index 871e7dead..9ed9e093e 100644 --- a/es-core/src/ThemeData.cpp +++ b/es-core/src/ThemeData.cpp @@ -343,6 +343,11 @@ void ThemeData::parseElement(const pugi::xml_node& root, const std::map