pushing events into dll

This commit is contained in:
konaka
2026-02-07 21:51:41 +08:00
parent d10079dbc1
commit 22de261f48
+2 -29
View File
@@ -1014,37 +1014,10 @@ function UnitXP_SP3_OnEvent(event)
return; return;
elseif event == "PLAYER_ENTERING_WORLD" then elseif event == "PLAYER_ENTERING_WORLD" then
local test = pcall(UnitXP, "FPScap", UnitXP_SP3_Addon["FPScap"]); pcall(UnitXP, "onEvent", event);
local test2 = pcall(UnitXP, "backgroundFPScap", UnitXP_SP3_Addon["backgroundFPScap"]);
if not test then
UnitXP_SP3_Print(
"UnitXP_SP3.dll failed to execute \"FPScap\". You might need to update UnitXP_SP3.dll to support this method.");
end
if not test2 then
UnitXP_SP3_Print(
"UnitXP_SP3.dll failed to execute \"backgroundFPScap\". You might need to update UnitXP_SP3.dll to support this method.");
end
return; return;
elseif event == "PLAYER_LEAVING_WORLD" then elseif event == "PLAYER_LEAVING_WORLD" then
-- Some user report a faster loading time when FPS cap turns off pcall(UnitXP, "onEvent", event);
local test = pcall(UnitXP, "FPScap", 0);
local test2 = pcall(UnitXP, "backgroundFPScap", 0);
if not test then
if not skipUpdateMessage then
skipUpdateMessage = true;
UnitXP_SP3_Print(
"UnitXP_SP3.dll failed to execute \"FPScap\". You might need to update UnitXP_SP3.dll to support this method.");
end
end
if not test2 then
if not skipUpdateMessage then
skipUpdateMessage = true;
UnitXP_SP3_Print(
"UnitXP_SP3.dll failed to execute \"backgroundFPScap\". You might need to update UnitXP_SP3.dll to support this method.");
end
end
return; return;
end end