The print() function in Lua scripts now outputs to Rainmeter log (an alternative to the TO.LuaLog() function).

This commit is contained in:
Birunthan Mohanathas 2011-01-30 13:04:17 +00:00
parent 251beb9e3a
commit a69e2e91d2
6 changed files with 25 additions and 29 deletions

View File

@ -9,14 +9,12 @@ void push_wstring (lua_State* L, void* value, const char* type)
lua_pushstring(L,str2.c_str());
}
void push_wchar(lua_State* L, void* value, const char* type)
{
std::string str2 = ConvertToAscii((WCHAR*)value);
lua_pushstring(L,str2.c_str());
}
std::wstring to_wstring(lua_State* L, int arg, void* type)
{
// We have a static wstring here so we can keep a copy of the string

View File

@ -17,4 +17,3 @@ const wchar_t* to_wchar (lua_State* L, int arg, void* type);
int is_wchar (lua_State* L, int lo, const char* type, int def, tolua_Error* err);
#endif

View File

@ -195,5 +195,3 @@ bool LuaScript::FunctionExists(const char* p_strFuncName)
return bExists;
}

View File

@ -114,6 +114,7 @@ static const luaL_reg rainmeter_ext_funcs[] =
TOLUA_API int luaopen_rainmeter_ext (lua_State* L)
{
lua_register(L, "print", staticLuaLog);
luaL_register(L,"TO", rainmeter_ext_funcs);
return 1;
}