mirror of
https://github.com/virtcode/hypr-dynamic-cursors
synced 2025-09-20 00:23:22 +02:00
fix: building on latest hyprland version
Signed-off-by: rooot <hey@rooot.gay>
This commit is contained in:
parent
81f4b964f9
commit
20d37fa404
2 changed files with 6 additions and 5 deletions
|
@ -288,9 +288,9 @@ SP<Aquamarine::IBuffer> CDynamicCursors::renderHardware(CPointerManager* pointer
|
||||||
g_pHyprOpenGL->beginSimple(state->monitor.lock(), damage, RBO);
|
g_pHyprOpenGL->beginSimple(state->monitor.lock(), damage, RBO);
|
||||||
|
|
||||||
if (**PHW_DEBUG)
|
if (**PHW_DEBUG)
|
||||||
g_pHyprOpenGL->clear(CColor{rand() / float(RAND_MAX), rand() / float(RAND_MAX), rand() / float(RAND_MAX), 1.F});
|
g_pHyprOpenGL->clear(CHyprColor{rand() / float(RAND_MAX), rand() / float(RAND_MAX), rand() / float(RAND_MAX), 1.F});
|
||||||
else
|
else
|
||||||
g_pHyprOpenGL->clear(CColor{0.F, 0.F, 0.F, 0.F});
|
g_pHyprOpenGL->clear(CHyprColor{0.F, 0.F, 0.F, 0.F});
|
||||||
|
|
||||||
|
|
||||||
// the box should start in the middle portion, rotate by our calculated amount
|
// the box should start in the middle portion, rotate by our calculated amount
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <hyprgraphics/color/Color.hpp>
|
||||||
#include <hyprland/src/helpers/memory/Memory.hpp>
|
#include <hyprland/src/helpers/memory/Memory.hpp>
|
||||||
#include <hyprland/src/plugins/HookSystem.hpp>
|
#include <hyprland/src/plugins/HookSystem.hpp>
|
||||||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||||
|
@ -102,8 +103,8 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
|
||||||
// check that header version aligns with running version
|
// check that header version aligns with running version
|
||||||
const std::string HASH = __hyprland_api_get_hash();
|
const std::string HASH = __hyprland_api_get_hash();
|
||||||
if (HASH != GIT_COMMIT_HASH) {
|
if (HASH != GIT_COMMIT_HASH) {
|
||||||
HyprlandAPI::addNotification(PHANDLE, "[dynamic-cursors] Failed to load, mismatched headers!", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
HyprlandAPI::addNotification(PHANDLE, "[dynamic-cursors] Failed to load, mismatched headers!", CHyprColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||||
HyprlandAPI::addNotification(PHANDLE, std::format("[dynamic-cursors] Built with: {}, running: {}", GIT_COMMIT_HASH, HASH), CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
HyprlandAPI::addNotification(PHANDLE, std::format("[dynamic-cursors] Built with: {}, running: {}", GIT_COMMIT_HASH, HASH), CHyprColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||||
throw std::runtime_error("version mismatch");
|
throw std::runtime_error("version mismatch");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +161,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
|
||||||
g_pSetCursorSurfaceHook = hook("setCursorSurface", "CCursorManager", (void*) &hkSetCursorSurface);
|
g_pSetCursorSurfaceHook = hook("setCursorSurface", "CCursorManager", (void*) &hkSetCursorSurface);
|
||||||
g_pUpdateThemeHook = hook("updateTheme", "CCursorManager", (void*) &hkUpdateTheme);
|
g_pUpdateThemeHook = hook("updateTheme", "CCursorManager", (void*) &hkUpdateTheme);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
HyprlandAPI::addNotification(PHANDLE, "[dynamic-cursors] Failed to load, hooks could not be made!", CColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
HyprlandAPI::addNotification(PHANDLE, "[dynamic-cursors] Failed to load, hooks could not be made!", CHyprColor{1.0, 0.2, 0.2, 1.0}, 5000);
|
||||||
throw std::runtime_error("hooks failed");
|
throw std::runtime_error("hooks failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue