fix(Globals): Unable to start freeze thread pool
This commit is contained in:
parent
3ba12dca7f
commit
a687e6df48
@ -8,7 +8,7 @@ namespace big
|
||||
{
|
||||
if (ImGui::BeginTabItem("Globals"))
|
||||
{
|
||||
if (ImGui::Checkbox("Enable Freezing", &g_globals_service->m_running) && !g_globals_service->m_running)
|
||||
if (ImGui::Checkbox("Enable Freezing", &g_globals_service->m_running) && g_globals_service->m_running)
|
||||
g_thread_pool->push([&]() { g_globals_service->loop(); });
|
||||
|
||||
if (ImGui::Button("Load"))
|
||||
|
@ -57,9 +57,6 @@ namespace big
|
||||
|
||||
void globals_service::loop()
|
||||
{
|
||||
// Don't start loop if it's already running...
|
||||
if (m_running) return;
|
||||
|
||||
while (m_running)
|
||||
for (auto& global : m_globals)
|
||||
if (global.m_freeze) global.write();
|
||||
|
Reference in New Issue
Block a user