mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Script: ScriptFile may now be a relative path (e.g. ScriptFile=File.lua is now valid and equal to ScriptFile=#CURRENTPATH#File.lua)
This commit is contained in:
parent
f0fbc0f145
commit
349ad952ad
@ -142,10 +142,13 @@ void CMeasureScript::ReadConfig(CConfigParser& parser, const WCHAR* section)
|
|||||||
// Read common configs
|
// Read common configs
|
||||||
CMeasure::ReadConfig(parser, section);
|
CMeasure::ReadConfig(parser, section);
|
||||||
|
|
||||||
m_ScriptFile = ConvertToAscii(parser.ReadString(section, L"ScriptFile", L"").c_str());
|
std::wstring file = parser.ReadString(section, L"ScriptFile", L"");
|
||||||
|
|
||||||
if (!m_ScriptFile.empty())
|
if (!file.empty())
|
||||||
{
|
{
|
||||||
|
file = m_MeterWindow->MakePathAbsolute(file);
|
||||||
|
m_ScriptFile = ConvertToAscii(file.c_str());
|
||||||
|
|
||||||
if (!m_Initialized ||
|
if (!m_Initialized ||
|
||||||
oldScriptFile != m_ScriptFile)
|
oldScriptFile != m_ScriptFile)
|
||||||
{
|
{
|
||||||
|
@ -98,7 +98,7 @@ bool LuaScript::IsFunction(const char* funcName)
|
|||||||
{
|
{
|
||||||
bool bExists = false;
|
bool bExists = false;
|
||||||
|
|
||||||
if (m_Initialized && funcName)
|
if (m_Initialized)
|
||||||
{
|
{
|
||||||
// Push our table onto the stack
|
// Push our table onto the stack
|
||||||
PushTable();
|
PushTable();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user