From 0c5b5900a56b0356c7e957e617ca25d95b2f674e Mon Sep 17 00:00:00 2001 From: sector-a <82838084+sector-a@users.noreply.github.com> Date: Tue, 30 Dec 2025 04:17:07 +0300 Subject: [PATCH] Prevent `updateSelected` from being repeatedly called --- source/funkin/ui/freeplay/SongMenuItem.hx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/funkin/ui/freeplay/SongMenuItem.hx b/source/funkin/ui/freeplay/SongMenuItem.hx index 6e28d16eb..663613553 100644 --- a/source/funkin/ui/freeplay/SongMenuItem.hx +++ b/source/funkin/ui/freeplay/SongMenuItem.hx @@ -723,9 +723,13 @@ class SongMenuItem extends FlxSpriteGroup function set_selected(value:Bool):Bool { - // cute one liners, lol! + final wasSelected:Bool = selected; + selected = value; - updateSelected(); + if (wasSelected != selected) + { + updateSelected(); + } return selected; }