Skip to content

Fix a minor issue in StrumLine#958

Draft
HEIHUAa wants to merge 2 commits into
CodenameCrew:mainfrom
HEIHUAa:StrumLine
Draft

Fix a minor issue in StrumLine#958
HEIHUAa wants to merge 2 commits into
CodenameCrew:mainfrom
HEIHUAa:StrumLine

Conversation

@HEIHUAa

@HEIHUAa HEIHUAa commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Previously, using str.ID to read the state might have been inconsistent with the input from the code above:

for (i in 0...membersLength) {
    __pressed[i] = members[i].__getPressed(this);
    __justPressed[i] = members[i].__getJustPressed(this);
    __justReleased[i] = members[i].__getJustReleased(this);
}

It has now been unified to use the members index. Additionally, the new approach may offer better performance.

@HEIHUAa

HEIHUAa commented Apr 22, 2026

Copy link
Copy Markdown
Contributor Author

Added an extra optimization: due to the frequent calls to strumID, the modulus operation for each call has been eliminated. Using an if condition is much faster than %.

@Raltyro
Raltyro marked this pull request as draft July 26, 2026 14:48
@Raltyro

Raltyro commented Jul 26, 2026

Copy link
Copy Markdown
Member

I'll check back on this to fix something about this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants