Workaround cross call not working within one context

This commit is contained in:
IQuant 2024-09-17 20:10:03 +03:00
parent 3497a4a321
commit db9eee80be
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,6 @@
function HasFlagPersistent(flag)
if EwHasPersistentFlag ~= nil then
return EwHasPersistentFlag(flag)
end
return CrossCall("ew_has_flag", flag)
end

View file

@ -5,7 +5,11 @@ for _, flag in ipairs(util.string_split(ctx.proxy_opt.progress, ",")) do
end
local function has_flag(flag)
return flag_present[flag]
return flag_present[flag] == true
end
function EwHasPersistentFlag(flag)
return has_flag(flag)
end
np.CrossCallAdd("ew_has_flag", has_flag)