fix(Globals): Unable to start freeze thread pool

This commit is contained in:
Yimura 2022-01-08 19:56:05 +01:00
parent 3ba12dca7f
commit a687e6df48
No known key found for this signature in database
GPG Key ID: 3D8FF4397E768682
2 changed files with 1 additions and 4 deletions

View File

@ -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"))

View File

@ -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();