mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed: SkinPath is read from Rainmeter.ini in portable installations.
This commit is contained in:
parent
3d9fc72776
commit
710bce5ca4
@ -1726,6 +1726,7 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath)
|
||||
if (!c_DummyLitestep) InitalizeLitestep();
|
||||
|
||||
bool bDefaultIniLocation = false;
|
||||
bool bPortableInstallation = false;
|
||||
|
||||
if (c_CmdLine.empty())
|
||||
{
|
||||
@ -1745,6 +1746,10 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath)
|
||||
CreateDefaultConfigFile(m_IniFile);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bPortableInstallation = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1819,6 +1824,8 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath)
|
||||
m_SkinPath += L"Skins\\";
|
||||
|
||||
// Read the skin folder from the ini file
|
||||
if (!bPortableInstallation)
|
||||
{
|
||||
tmpSzPath[0] = L'\0';
|
||||
if (GetPrivateProfileString(L"Rainmeter", L"SkinPath", L"", tmpSzPath, MAX_LINE_LENGTH, m_IniFile.c_str()) > 0)
|
||||
{
|
||||
@ -1871,6 +1878,7 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath)
|
||||
Log(LOG_WARNING, L"Unable to get the My Documents location.");
|
||||
}
|
||||
}
|
||||
}
|
||||
WritePrivateProfileString(L"Rainmeter", L"SkinPath", m_SkinPath.c_str(), m_IniFile.c_str());
|
||||
|
||||
delete [] tmpSzPath;
|
||||
|
Loading…
Reference in New Issue
Block a user