mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
4b30714520
- 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
29 lines
427 B
C++
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
|