mirror of
https://github.com/virtcode/hypr-dynamic-cursors
synced 2025-09-19 08:03:21 +02:00
test: added some logs to diagnose
This commit is contained in:
parent
28f33155f2
commit
cf8028803f
1 changed files with 8 additions and 0 deletions
|
@ -93,6 +93,7 @@ void CDynamicCursors::renderSoftware(CPointerManager* pointers, SP<CMonitor> pMo
|
||||||
// we rotate the cursor by our calculated amount
|
// we rotate the cursor by our calculated amount
|
||||||
box.rot = resultShown.rotation;
|
box.rot = resultShown.rotation;
|
||||||
|
|
||||||
|
Debug::log(LOG, "[dynamic-cursors] rendering software cursors");
|
||||||
// now pass the hotspot to rotate around
|
// now pass the hotspot to rotate around
|
||||||
renderCursorTextureInternalWithDamage(texture, &box, &damage, 1.F, nullptr, 0, pointers->currentCursorImage.hotspot * state->monitor->scale * zoom, zoom > 1 && **PNEAREST, resultShown.stretch.angle, resultShown.stretch.magnitude);
|
renderCursorTextureInternalWithDamage(texture, &box, &damage, 1.F, nullptr, 0, pointers->currentCursorImage.hotspot * state->monitor->scale * zoom, zoom > 1 && **PNEAREST, resultShown.stretch.angle, resultShown.stretch.magnitude);
|
||||||
|
|
||||||
|
@ -221,6 +222,7 @@ SP<Aquamarine::IBuffer> CDynamicCursors::renderHardware(CPointerManager* pointer
|
||||||
|
|
||||||
RBO->bind();
|
RBO->bind();
|
||||||
|
|
||||||
|
Debug::log(LOG, "[dynamic-cursors] rendering hardware cursors");
|
||||||
g_pHyprOpenGL->beginSimple(state->monitor.get(), damage, RBO);
|
g_pHyprOpenGL->beginSimple(state->monitor.get(), damage, RBO);
|
||||||
|
|
||||||
if (**PHW_DEBUG)
|
if (**PHW_DEBUG)
|
||||||
|
@ -350,6 +352,8 @@ void CDynamicCursors::calculate(EModeUpdate type) {
|
||||||
resultShown = result;
|
resultShown = result;
|
||||||
resultShown.clamp(**PTHRESHOLD * (PI / 180.0), 0.01, 0.01); // clamp low values so it is rendered pixel-perfectly when no effect
|
resultShown.clamp(**PTHRESHOLD * (PI / 180.0), 0.01, 0.01); // clamp low values so it is rendered pixel-perfectly when no effect
|
||||||
|
|
||||||
|
Debug::log(LOG, "[dynamic-cursors] updating with rotation: {}, scale: {}, stretch: {},{}", resultShown.rotation, resultShown.scale, resultShown.stretch.magnitude.x, resultShown.stretch.magnitude.y);
|
||||||
|
|
||||||
// lock software cursors if zooming
|
// lock software cursors if zooming
|
||||||
if (resultShown.scale > 1) {
|
if (resultShown.scale > 1) {
|
||||||
if (!zoomSoftware) {
|
if (!zoomSoftware) {
|
||||||
|
@ -371,9 +375,13 @@ void CDynamicCursors::calculate(EModeUpdate type) {
|
||||||
|
|
||||||
bool entered = false;
|
bool entered = false;
|
||||||
|
|
||||||
|
|
||||||
for (auto& m : g_pCompositor->m_vMonitors) {
|
for (auto& m : g_pCompositor->m_vMonitors) {
|
||||||
auto state = g_pPointerManager->stateFor(m);
|
auto state = g_pPointerManager->stateFor(m);
|
||||||
|
|
||||||
|
if (g_pPointerManager->softwareLockedFor(m))
|
||||||
|
Debug::log(LOG, "[dynamic-cursors] monitor {} has software lock", m->szName);
|
||||||
|
|
||||||
if (state->entered) entered = true;
|
if (state->entered) entered = true;
|
||||||
if (state->hardwareFailed || !state->entered)
|
if (state->hardwareFailed || !state->entered)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue