mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-10-06 10:06:28 +00:00
fix lockup on reloading config
This commit is contained in:
@@ -14,15 +14,21 @@ CThreadManager::~CThreadManager() {
|
||||
//
|
||||
}
|
||||
|
||||
int slowUpdate = 0;
|
||||
|
||||
void CThreadManager::handle() {
|
||||
|
||||
g_pConfigManager->init();
|
||||
|
||||
while (3.1415f) {
|
||||
g_pConfigManager->tick();
|
||||
slowUpdate++;
|
||||
if (slowUpdate >= g_pConfigManager->getInt("general:max_fps")){
|
||||
g_pConfigManager->tick();
|
||||
slowUpdate = 0;
|
||||
}
|
||||
|
||||
HyprCtl::tickHyprCtl();
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::microseconds(1000000 / g_pConfigManager->getInt("max_fps")));
|
||||
std::this_thread::sleep_for(std::chrono::microseconds(1000000 / g_pConfigManager->getInt("general:max_fps")));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user