summaryrefslogtreecommitdiff
path: root/src/helpers/Watchdog.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2024-02-18 15:00:34 +0000
committerGitHub <noreply@github.com>2024-02-18 15:00:34 +0000
commit13f6f0b923ff3ec94a3bec886c28b90402ceef91 (patch)
tree251f66bfb86416fad0fab18f3b2b2ce87847aa83 /src/helpers/Watchdog.cpp
parent7e8bcd675de15ee2498f1aa15c5b335e9a9a55f0 (diff)
Migrate the config to hyprlang (#4656)
* Migrate to hyprlang * pop up errors * fix swapped args * Meson & Nix: build with hyprlang * CI: add hyprlang to setup action * add infra for plugin stuff * fix hyprctl getoption * fix hyprctl getoption with json * format * fix post parse logic * fix autogen config * oops missed exec-once * fmt * fix ws rules * require 0.3.0 for hyprlang * nix: flaek * minor type fixes * fix cfg usages in swipe * use cvarlist for ws rules * fix throw in addPluginConfigVar * Nix: update hyprlang * minor fixes * fix disableLogs * mention hyprlang docs * bump hyprlang dep in cmake * Meson: bump min hyprlang version Nix: update hyprlang * minor fix * Nix: update meson patch --------- Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
Diffstat (limited to 'src/helpers/Watchdog.cpp')
-rw-r--r--src/helpers/Watchdog.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/helpers/Watchdog.cpp b/src/helpers/Watchdog.cpp
index 2a26ee29..ce4d2707 100644
--- a/src/helpers/Watchdog.cpp
+++ b/src/helpers/Watchdog.cpp
@@ -13,7 +13,7 @@ CWatchdog::CWatchdog() {
m_iMainThreadPID = pthread_self();
m_pWatchdog = std::make_unique<std::thread>([this] {
- static auto* const PTIMEOUT = &g_pConfigManager->getConfigValuePtr("debug:watchdog_timeout")->intValue;
+ static auto* const PTIMEOUT = (Hyprlang::INT* const*)g_pConfigManager->getConfigValuePtr("debug:watchdog_timeout");
while (1337) {
std::unique_lock lk(m_mWatchdogMutex);
@@ -21,7 +21,7 @@ CWatchdog::CWatchdog() {
if (!m_bWillWatch)
m_cvWatchdogCondition.wait(lk, [this] { return m_bNotified; });
else {
- if (m_cvWatchdogCondition.wait_for(lk, std::chrono::milliseconds((int)(*PTIMEOUT * 1000.0)), [this] { return m_bNotified; }) == false)
+ if (m_cvWatchdogCondition.wait_for(lk, std::chrono::milliseconds((int)(**PTIMEOUT * 1000.0)), [this] { return m_bNotified; }) == false)
pthread_kill(m_iMainThreadPID, SIGUSR1);
}
@@ -37,9 +37,9 @@ CWatchdog::CWatchdog() {
}
void CWatchdog::startWatching() {
- static auto* const PTIMEOUT = &g_pConfigManager->getConfigValuePtr("debug:watchdog_timeout")->intValue;
+ static auto* const PTIMEOUT = (Hyprlang::INT* const*)g_pConfigManager->getConfigValuePtr("debug:watchdog_timeout");
- if (*PTIMEOUT == 0)
+ if (**PTIMEOUT == 0)
return;
m_tTriggered = std::chrono::high_resolution_clock::now();