From 7deea6cec5d2173f66d4c2dd75ca0b633b887bc7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 May 2018 00:17:30 +0300 Subject: sounds packed into CMPlugin (reduces usage of hLangpack) --- plugins/MirLua/src/m_sounds.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins/MirLua/src') diff --git a/plugins/MirLua/src/m_sounds.cpp b/plugins/MirLua/src/m_sounds.cpp index cd9a089ce4..e6737ed705 100644 --- a/plugins/MirLua/src/m_sounds.cpp +++ b/plugins/MirLua/src/m_sounds.cpp @@ -7,7 +7,12 @@ static int lua_AddSound(lua_State *L) ptrW section(mir_utf8decodeW(luaL_optstring(L, 3, MODULE))); ptrW filePath(mir_utf8decodeW(lua_tostring(L, 4))); - int res = Skin_AddSound(name, section, description, filePath, CMLuaEnvironment::GetEnvironmentId(L)); + int res; + CMPluginBase *pPlugin = GetPluginByLangId(CMLuaEnvironment::GetEnvironmentId(L)); + if (pPlugin != nullptr) + res = pPlugin->addSound(name, section, description, filePath); + else + res = 1; lua_pushboolean(L, res == 0); return 1; -- cgit v1.2.3