mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-07-01 12:02:55 +08:00
Fix lua native bindings and lua script reload (#1575)
* fix: script manager and lua scripts: change the api so that the m_scripts array is only modified in a specific safe location: before it gets ticked. * fix script manager: don't expose the script vector directly, for multithreading safety * fix lua manager usage: don't iterate the module array without locking, nor un/load module from a script thread * lua script: only do actual loading of lua modules in script mgr * lua native bindin: fix pointer parameters, out C style parameters are returned as multiple return values lua-style
This commit is contained in:
@ -10,8 +10,8 @@ namespace big
|
||||
{
|
||||
components::sub_title("DEBUG_SCRIPTS_SUB_TITLE"_T);
|
||||
|
||||
for (const auto& script : g_script_mgr.scripts())
|
||||
{
|
||||
g_script_mgr.for_each_script([](const auto& script) {
|
||||
|
||||
if (script->is_toggleable())
|
||||
{
|
||||
if (ImGui::Checkbox(script->name(), script->toggle_ptr()))
|
||||
@ -19,7 +19,8 @@ namespace big
|
||||
g_notification_service->push(std::string(script->name()).append(" script"), script->is_enabled() ? "Resumed" : "Halted");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user