mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Script: Fix that default value is not used in Meter:GetOption
This commit is contained in:
parent
08eb662e1f
commit
5fd98509cf
@ -40,10 +40,11 @@ static int GetOption(lua_State* L)
|
|||||||
MeterWindow* meterWindow = self->GetMeterWindow();
|
MeterWindow* meterWindow = self->GetMeterWindow();
|
||||||
ConfigParser& parser = meterWindow->GetParser();
|
ConfigParser& parser = meterWindow->GetParser();
|
||||||
|
|
||||||
std::wstring strTmp = LuaManager::ToWide(2);
|
const std::wstring section = LuaManager::ToWide(2);
|
||||||
strTmp = parser.ReadString(self->GetName(), strTmp.c_str(), LuaManager::ToWide(3).c_str());
|
const std::wstring defValue = LuaManager::ToWide(3);
|
||||||
|
const std::wstring& value =
|
||||||
LuaManager::PushWide(strTmp);
|
parser.ReadString(self->GetName(), section.c_str(), defValue.c_str());
|
||||||
|
LuaManager::PushWide(value);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,10 +40,11 @@ static int GetOption(lua_State* L)
|
|||||||
MeterWindow* meterWindow = self->GetMeterWindow();
|
MeterWindow* meterWindow = self->GetMeterWindow();
|
||||||
ConfigParser& parser = meterWindow->GetParser();
|
ConfigParser& parser = meterWindow->GetParser();
|
||||||
|
|
||||||
std::wstring strTmp = LuaManager::ToWide(2);
|
const std::wstring section = LuaManager::ToWide(2);
|
||||||
strTmp = parser.ReadString(self->GetName(), strTmp.c_str(), L"");
|
const std::wstring defValue = LuaManager::ToWide(3);
|
||||||
|
const std::wstring& value =
|
||||||
LuaManager::PushWide(strTmp);
|
parser.ReadString(self->GetName(), section.c_str(), defValue.c_str());
|
||||||
|
LuaManager::PushWide(value);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user