diff --git a/CallbackHandler-1.0/CallbackHandler-1.0.lua b/CallbackHandler-1.0/CallbackHandler-1.0.lua index 21569f4..56f4bd4 100644 --- a/CallbackHandler-1.0/CallbackHandler-1.0.lua +++ b/CallbackHandler-1.0/CallbackHandler-1.0.lua @@ -7,7 +7,20 @@ if not CallbackHandler then return end -- No upgrade needed local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end} -- Lua APIs -local securecallfunction, error = securecallfunction, error +local xpcall = xpcall +local geterrorhandler = geterrorhandler +-- securecallfunction does not exist in WoW 3.3.5a; provide a fallback that preserves error-isolation semantics +local securecallfunction = securecallfunction or function(func, ...) + if geterrorhandler then + local errorhandler = geterrorhandler() + if errorhandler then + xpcall(func, errorhandler, ...) + return + end + end + return func(...) +end +local error = error local setmetatable, rawget = setmetatable, rawget local next, select, pairs, type, tostring = next, select, pairs, type, tostring diff --git a/LibSharedMedia-3.0.toc b/LibSharedMedia-3.0.toc index 78b7cb4..e4ce6f4 100644 --- a/LibSharedMedia-3.0.toc +++ b/LibSharedMedia-3.0.toc @@ -1,4 +1,4 @@ -## Interface: 11508, 11507, 20505, 30405, 38000, 40402, 50503, 50502, 120001, 110207, 120000 +## Interface: 30300, 11508, 11507, 20505, 30405, 38000, 40402, 50503, 50502, 120001, 110207, 120000 ## LoadOnDemand: 1 ## Title: Lib: SharedMedia-3.0 diff --git a/LibSharedMedia-3.0/LibSharedMedia-3.0.lua b/LibSharedMedia-3.0/LibSharedMedia-3.0.lua index 3fc6b2c..8b55aed 100644 --- a/LibSharedMedia-3.0/LibSharedMedia-3.0.lua +++ b/LibSharedMedia-3.0/LibSharedMedia-3.0.lua @@ -10,7 +10,7 @@ Dependencies: LibStub, CallbackHandler-1.0 License: LGPL v2.1 ]] -local MAJOR, MINOR = "LibSharedMedia-3.0", 12000001 -- 12.0.0 v1 / increase manually on changes +local MAJOR, MINOR = "LibSharedMedia-3.0", 12000002 -- 3.0.0 v1 / increase manually on changes local lib = LibStub:NewLibrary(MAJOR, MINOR) if not lib then return end @@ -61,18 +61,13 @@ lib.MediaType.SOUND = "sound" -- sound files -- BACKGROUND if not lib.MediaTable.background then lib.MediaTable.background = {} end lib.MediaTable.background["None"] = [[]] -lib.MediaTable.background["Blizzard Collections Background"] = [[Interface\Collections\CollectionsBackgroundTile]] lib.MediaTable.background["Blizzard Dialog Background"] = [[Interface\DialogFrame\UI-DialogBox-Background]] lib.MediaTable.background["Blizzard Dialog Background Dark"] = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]] lib.MediaTable.background["Blizzard Dialog Background Gold"] = [[Interface\DialogFrame\UI-DialogBox-Gold-Background]] -lib.MediaTable.background["Blizzard Garrison Background"] = [[Interface\Garrison\GarrisonUIBackground]] -lib.MediaTable.background["Blizzard Garrison Background 2"] = [[Interface\Garrison\GarrisonUIBackground2]] -lib.MediaTable.background["Blizzard Garrison Background 3"] = [[Interface\Garrison\GarrisonMissionUIInfoBoxBackgroundTile]] lib.MediaTable.background["Blizzard Low Health"] = [[Interface\FullScreenTextures\LowHealth]] lib.MediaTable.background["Blizzard Marble"] = [[Interface\FrameGeneral\UI-Background-Marble]] lib.MediaTable.background["Blizzard Out of Control"] = [[Interface\FullScreenTextures\OutOfControl]] lib.MediaTable.background["Blizzard Parchment"] = [[Interface\AchievementFrame\UI-Achievement-Parchment-Horizontal]] -lib.MediaTable.background["Blizzard Parchment 2"] = [[Interface\AchievementFrame\UI-GuildAchievement-Parchment-Horizontal]] lib.MediaTable.background["Blizzard Rock"] = [[Interface\FrameGeneral\UI-Background-Rock]] lib.MediaTable.background["Blizzard Tabard Background"] = [[Interface\TabardFrame\TabardFrameBackground]] lib.MediaTable.background["Blizzard Tooltip"] = [[Interface\Tooltips\UI-Tooltip-Background]] @@ -181,9 +176,9 @@ else SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]] SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT__.TTF]] SML_MT_font["MoK"] = [[Fonts\K_Pagetext.TTF]] - SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS_CYR.TTF]] + SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS.TTF]] SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]] - SML_MT_font["Skurri"] = [[Fonts\SKURRI_CYR.TTF]] + SML_MT_font["Skurri"] = [[Fonts\SKURRI.TTF]] -- lib.DefaultMedia.font = "Friz Quadrata TT" -- @@ -199,7 +194,7 @@ lib.DefaultMedia.statusbar = "Blizzard" -- SOUND if not lib.MediaTable.sound then lib.MediaTable.sound = {} end -lib.MediaTable.sound["None"] = 1 -- Relies on the fact that PlaySoundFile doesn't error on this value +lib.MediaTable.sound["None"] = [[Interface\Quiet.ogg]] -- non-empty string so Fetch returns a value; file absent in 3.3.5a so no sound plays lib.DefaultMedia.sound = "None" local function buildMediaList(mediatype)