diff --git a/.gitignore b/.gitignore index 923ebc2..9c51d11 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ compile_commands.events.json out .cache result +notes.md diff --git a/src/cursor.cpp b/src/cursor.cpp index 1b5a652..83235f6 100644 --- a/src/cursor.cpp +++ b/src/cursor.cpp @@ -60,7 +60,7 @@ CDynamicCursors::~CDynamicCursors() { Reimplements rendering of the software cursor. Is also largely identical to hyprlands impl, but uses our custom rendering to rotate the cursor. */ -void CDynamicCursors::renderSoftware(CPointerManager* pointers, SP pMonitor, timespec* now, CRegion& damage, std::optional overridePos) { +void CDynamicCursors::renderSoftware(CPointerManager* pointers, SP pMonitor, const Time::steady_tp& now, CRegion& damage, std::optional overridePos) { static auto* const* PNEAREST = (Hyprlang::INT* const*) getConfig(CONFIG_HIGHRES_NEAREST); if (!pointers->hasCursor()) diff --git a/src/cursor.hpp b/src/cursor.hpp index 5347448..db784a9 100644 --- a/src/cursor.hpp +++ b/src/cursor.hpp @@ -25,7 +25,7 @@ class CDynamicCursors { void onTick(CPointerManager* pointers); /* hook on renderSoftwareCursorsFor */ - void renderSoftware(CPointerManager* pointers, SP pMonitor, timespec* now, CRegion& damage, std::optional overridePos); + void renderSoftware(CPointerManager* pointers, SP pMonitor, const Time::steady_tp& now, CRegion& damage, std::optional overridePos); /* hook on damageIfSoftware*/ void damageSoftware(CPointerManager* pointers); /* hook on renderHWCursorBuffer */ diff --git a/src/main.cpp b/src/main.cpp index 8bf9b76..3af67de 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -12,13 +12,14 @@ #include "globals.hpp" #include "cursor.hpp" #include "config/config.hpp" +#include "helpers/time/Time.hpp" #include "src/debug/Log.hpp" #include "src/managers/PointerManager.hpp" #include "src/version.h" -typedef void (*origRenderSofwareCursorsFor)(void*, SP, timespec*, CRegion&, std::optional); +typedef void (*origRenderSofwareCursorsFor)(void*, SP, const Time::steady_tp&, CRegion&, std::optional); inline CFunctionHook* g_pRenderSoftwareCursorsForHook = nullptr; -void hkRenderSoftwareCursorsFor(void* thisptr, SP pMonitor, timespec* now, CRegion& damage, std::optional overridePos) { +void hkRenderSoftwareCursorsFor(void* thisptr, SP pMonitor, const Time::steady_tp& now, CRegion& damage, std::optional overridePos) { if (isEnabled()) g_pDynamicCursors->renderSoftware((CPointerManager*) thisptr, pMonitor, now, damage, overridePos); else (*(origRenderSofwareCursorsFor)g_pRenderSoftwareCursorsForHook->m_pOriginal)(thisptr, pMonitor, now, damage, overridePos); }