From 69409021aced78b31da0c9f2def7332a4c4b973e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 12 Sep 2017 12:14:57 +0300 Subject: Revert "Merge branch 'master' of https://github.com/miranda-ng/miranda-ng" This reverts commit e09448dd03e3647717166e92ee818e395041993a, reversing changes made to b0f44b16bd1138de85a5d17bb42151742f9c8298. --- plugins/MirLua/src/m_sounds.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'plugins/MirLua') diff --git a/plugins/MirLua/src/m_sounds.cpp b/plugins/MirLua/src/m_sounds.cpp index b7e86b4c91..ea7c2a5e6a 100644 --- a/plugins/MirLua/src/m_sounds.cpp +++ b/plugins/MirLua/src/m_sounds.cpp @@ -7,7 +7,16 @@ static int sounds_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, CMLuaScript::GetScriptIdFromEnviroment(L)); + SKINSOUNDDESCEX ssd = { sizeof(SKINSOUNDDESCEX) }; + ssd.pszName = name; + ssd.dwFlags = SSDF_UNICODE; + ssd.pwszDescription = description; + ssd.pwszSection = section; + ssd.pwszDefaultFile = filePath; + + int hScriptLangpack = CMLuaScript::GetScriptIdFromEnviroment(L); + + INT_PTR res = CallService("Skin/Sounds/AddNew", hScriptLangpack, (LPARAM)&ssd); lua_pushboolean(L, res == 0); return 1; @@ -17,7 +26,7 @@ static int sounds_PlaySound(lua_State *L) { const char *name = luaL_checkstring(L, 1); - INT_PTR res = Skin_PlaySound(name); + INT_PTR res = SkinPlaySound(name); lua_pushboolean(L, res == 0); return 1; @@ -27,7 +36,7 @@ static int sounds_PlayFile(lua_State *L) { ptrW filePath(mir_utf8decodeW(luaL_checkstring(L, 1))); - INT_PTR res = Skin_PlaySoundFile(filePath); + INT_PTR res = SkinPlaySoundFile(filePath); lua_pushboolean(L, res == 0); return 1; -- cgit v1.2.3