Skip to content

Commit b41803c

Browse files
committed
feat(style): change the color of the Holographic Effect to user-defined, and solve the problem of the mouse getting stuck after the font is enlarged
1 parent eb95c49 commit b41803c

File tree

6 files changed

+126
-182
lines changed

6 files changed

+126
-182
lines changed

src/config/config_applier.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,18 @@ void ApplyDisplaySettings(const ConfigSnapshot* snapshot) {
161161
RECT rect;
162162
GetClientRect(hwnd, &rect);
163163
int pixels = rect.right * rect.bottom;
164-
UINT interval = (pixels < 50000) ? 33 :
164+
165+
/* Holographic effect needs more aggressive throttling */
166+
UINT interval;
167+
if (CLOCK_HOLOGRAPHIC_EFFECT) {
168+
interval = (pixels < 30000) ? 50 :
169+
(pixels < 100000) ? 80 :
170+
(pixels < 300000) ? 120 : 200;
171+
} else {
172+
interval = (pixels < 50000) ? 33 :
165173
(pixels < 200000) ? 50 :
166174
(pixels < 500000) ? 80 : 120;
175+
}
167176
SetTimer(hwnd, TIMER_ID_RENDER_ANIMATION, interval, NULL);
168177
} else {
169178
KillTimer(hwnd, TIMER_ID_RENDER_ANIMATION);

0 commit comments

Comments
 (0)