From 2f8fbd7ecdb773c06695b1711d25f8f2e78fc3bd Mon Sep 17 00:00:00 2001 From: lethosor Date: Mon, 12 Feb 2018 13:58:55 -0500 Subject: [PATCH] Show warning if all plugins fail to load (e.g. on Windows XP) --- library/PluginManager.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/library/PluginManager.cpp b/library/PluginManager.cpp index a4927a756..b6d1dcc92 100644 --- a/library/PluginManager.cpp +++ b/library/PluginManager.cpp @@ -797,6 +797,25 @@ PluginManager::~PluginManager() void PluginManager::init() { loadAll(); + + bool any_loaded = false; + for (auto p : all_plugins) + { + if (p.second->getState() == Plugin::PS_LOADED) + { + any_loaded = true; + break; + } + } + if (!any_loaded && !listPlugins().empty()) + { + Core::printerr("\n" +"All plugins present failed to load.\n" +"If you are using Windows XP, this is probably due to a Visual Studio 2015 bug.\n" +"Windows XP is unsupported by Microsoft as of 2014, so we do not support it.\n\n" +"If this was unexpected and you are not using Windows XP, please report this.\n\n" + ); + } } bool PluginManager::addPlugin(string name)