mirror of
https://github.com/virtcode/hypr-dynamic-cursors
synced 2025-09-19 08:03:21 +02:00
Compare commits
No commits in common. "5cf62970723f0d8eb8733ad93247d4b80d729e05" and "03e8cb17ed98554d09232ea8c301ffac21d14ec8" have entirely different histories.
5cf6297072
...
03e8cb17ed
5 changed files with 8 additions and 5 deletions
|
@ -14,9 +14,6 @@ commit_pins = [
|
|||
["788ae588979c2a1ff8a660f16e3c502ef5796755", "111669a699f998b5eb5a0d5610b5fcb748aab038"], # v0.46.0
|
||||
["254fc2bc6000075f660b4b8ed818a6af544d1d64", "111669a699f998b5eb5a0d5610b5fcb748aab038"], # v0.46.1
|
||||
["0bd541f2fd902dbfa04c3ea2ccf679395e316887", "111669a699f998b5eb5a0d5610b5fcb748aab038"], # v0.46.2
|
||||
["04ac46c54357278fc68f0a95d26347ea0db99496", "261bc1668f7de45b48ba6a40d5d727025575390b"], # v0.47.0
|
||||
["75dff7205f6d2bd437abfb4196f700abee92581a", "261bc1668f7de45b48ba6a40d5d727025575390b"], # v0.47.1
|
||||
["882f7ad7d2bbfc7440d0ccaef93b1cdd78e8e3ff", "261bc1668f7de45b48ba6a40d5d727025575390b"], # v0.47.2
|
||||
]
|
||||
|
||||
[dynamic-cursors]
|
||||
|
|
|
@ -127,6 +127,8 @@ void CDynamicCursors::renderSoftware(CPointerManager* pointers, SP<CMonitor> pMo
|
|||
CCursorPassElement::SRenderData data;
|
||||
data.tex = texture;
|
||||
data.box = box;
|
||||
data.syncTimeline = pointers->currentCursorImage.waitTimeline;
|
||||
data.syncPoint = pointers->currentCursorImage.waitPoint;
|
||||
data.hotspot = pointers->currentCursorImage.hotspot * state->monitor->scale * zoom;
|
||||
data.nearest = nearest;
|
||||
data.stretchAngle = resultShown.stretch.angle;
|
||||
|
@ -263,7 +265,7 @@ SP<Aquamarine::IBuffer> CDynamicCursors::renderHardware(CPointerManager* pointer
|
|||
xbox.rot = resultShown.rotation;
|
||||
|
||||
// use our custom draw function
|
||||
renderCursorTextureInternalWithDamage(texture, &xbox, damage, 1.F, pointers->currentCursorImage.hotspot * state->monitor->scale * zoom, zoom > 1 && **PNEAREST, resultShown.stretch.angle, resultShown.stretch.magnitude);
|
||||
renderCursorTextureInternalWithDamage(texture, &xbox, damage, 1.F, pointers->currentCursorImage.waitTimeline, pointers->currentCursorImage.waitPoint, pointers->currentCursorImage.hotspot * state->monitor->scale * zoom, zoom > 1 && **PNEAREST, resultShown.stretch.angle, resultShown.stretch.magnitude);
|
||||
|
||||
g_pHyprOpenGL->end();
|
||||
glFlush();
|
||||
|
|
|
@ -17,6 +17,8 @@ void CCursorPassElement::draw(const CRegion& damage) {
|
|||
&data.box,
|
||||
data.damage.empty() ? damage : data.damage,
|
||||
1.F,
|
||||
data.syncTimeline,
|
||||
data.syncPoint,
|
||||
data.hotspot,
|
||||
data.nearest,
|
||||
data.stretchAngle,
|
||||
|
|
|
@ -13,6 +13,8 @@ class CCursorPassElement : public IPassElement {
|
|||
SP<CTexture> tex;
|
||||
CBox box;
|
||||
CRegion damage;
|
||||
SP<CSyncTimeline> syncTimeline;
|
||||
int64_t syncPoint = 0;
|
||||
|
||||
Vector2D hotspot;
|
||||
bool nearest;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <hyprland/src/render/OpenGL.hpp>
|
||||
#include <hyprland/src/helpers/math/Math.hpp>
|
||||
|
||||
void renderCursorTextureInternalWithDamage(SP<CTexture> tex, CBox* pBox, const CRegion& damage, float alpha, Vector2D hotspot, bool nearest, float stretchAngle, Vector2D stretch);
|
||||
void renderCursorTextureInternalWithDamage(SP<CTexture> tex, CBox* pBox, const CRegion& damage, float alpha, SP<CSyncTimeline> waitTimeline, uint64_t waitPoint, Vector2D hotspot, bool nearest, float stretchAngle, Vector2D stretch);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue