Minor fixes

This commit is contained in:
spx 2012-06-21 02:06:17 -07:00
parent 6456b6adb3
commit 6c5cd602bc
4 changed files with 13 additions and 5 deletions

Binary file not shown.

View File

@ -1039,7 +1039,10 @@ void CDialogAbout::CTabPlugins::Initialize()
};
findPlugins(Rainmeter->GetPluginPath());
if (Rainmeter->HasUserPluginPath())
{
findPlugins(Rainmeter->GetUserPluginPath());
}
}
/*

View File

@ -133,11 +133,14 @@ void CMeasurePlugin::ReadOptions(CConfigParser& parser, const WCHAR* section)
pluginFile += pluginName;
m_Plugin = CSystem::RmLoadLibrary(pluginFile.c_str());
if (!m_Plugin)
{
if (Rainmeter->HasUserPluginPath())
{
// Try from settings path
pluginFile = Rainmeter->GetUserPluginPath();
pluginFile += pluginName;
m_Plugin = CSystem::RmLoadLibrary(pluginFile.c_str());
}
if (!m_Plugin)
{
LogWithArgs(LOG_ERROR, L"Plugin: \"%s\" not found", pluginName.c_str());

View File

@ -143,6 +143,8 @@ public:
std::wstring GetUserPluginPath() { return m_SettingsPath + L"Plugins\\"; }
std::wstring GetAddonPath() { return m_SettingsPath + L"Addons\\"; }
bool HasUserPluginPath() { return (_wcsicmp(m_Path.c_str(), m_SettingsPath.c_str()) != 0); }
std::wstring GetDefaultSkinPath() { return m_Path + L"Defaults\\Skins\\"; }
std::wstring GetDefaultThemePath() { return m_Path + L"Defaults\\Themes\\"; }
std::wstring GetDefaultPluginPath() { return m_Path + L"Defaults\\Plugins\\"; }