rainmeter-studio/Library/lua/LuaManager.h
Birunthan Mohanathas 4b30714520 - Fixed: Rainmeter crashes if the Lua GetStringValue() function returns an invalid value
- Fixed: Rainmeter crashes on initialization if Lua is invalid (e.g. syntax error)
- Fixed: Rainmeter crashes on mouse action if Lua file is not initialized
- Fixed: Measure=SCRIPT tries to process mouse actions even if corresponding function does not exist in the Lua file causing log to fill with 'nil value' warnings
- Mainly cosmetic changes to logging of erros in Measure=SCRIPT
2011-01-30 10:39:10 +00:00

29 lines
427 B
C++

#ifndef LUA_MANAGER_H
#define LUA_MANAGER_H
#include "lua.hpp"
#include "tolua++.h"
class LuaManager
{
public:
static void Init();
static void CleanUp();
static lua_State* GetState() { return m_pState; }
static void ReportErrors(lua_State * L);
static void LuaLog(int nLevel, const char* format, ... );
protected:
static bool m_bInitialized;
static lua_State* m_pState;
};
#endif