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:
		| @@ -40,10 +40,11 @@ static int GetOption(lua_State* L) | ||||
| 	MeterWindow* meterWindow = self->GetMeterWindow(); | ||||
| 	ConfigParser& parser = meterWindow->GetParser(); | ||||
|  | ||||
| 	std::wstring strTmp = LuaManager::ToWide(2); | ||||
| 	strTmp = parser.ReadString(self->GetName(), strTmp.c_str(), LuaManager::ToWide(3).c_str()); | ||||
|  | ||||
| 	LuaManager::PushWide(strTmp); | ||||
| 	const std::wstring section = LuaManager::ToWide(2); | ||||
| 	const std::wstring defValue = LuaManager::ToWide(3); | ||||
| 	const std::wstring& value = | ||||
| 		parser.ReadString(self->GetName(), section.c_str(), defValue.c_str()); | ||||
| 	LuaManager::PushWide(value); | ||||
| 	return 1; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -40,10 +40,11 @@ static int GetOption(lua_State* L) | ||||
| 	MeterWindow* meterWindow = self->GetMeterWindow(); | ||||
| 	ConfigParser& parser = meterWindow->GetParser(); | ||||
|  | ||||
| 	std::wstring strTmp = LuaManager::ToWide(2); | ||||
| 	strTmp = parser.ReadString(self->GetName(), strTmp.c_str(), L""); | ||||
|  | ||||
| 	LuaManager::PushWide(strTmp); | ||||
| 	const std::wstring section = LuaManager::ToWide(2); | ||||
| 	const std::wstring defValue = LuaManager::ToWide(3); | ||||
| 	const std::wstring& value = | ||||
| 		parser.ReadString(self->GetName(), section.c_str(), defValue.c_str()); | ||||
| 	LuaManager::PushWide(value); | ||||
| 	return 1; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Birunthan Mohanathas
					Birunthan Mohanathas