Skip to content

Fix Options Menu sliders being frame-dependent at lower framerates - #677

Merged
blueskythlikesclouds merged 9 commits into
hedge-dev:mainfrom
Onaterdem:slider-fix
Mar 24, 2025
Merged

Fix Options Menu sliders being frame-dependent at lower framerates#677
blueskythlikesclouds merged 9 commits into
hedge-dev:mainfrom
Onaterdem:slider-fix

Conversation

@Onaterdem

@Onaterdem Onaterdem commented Mar 2, 2025

Copy link
Copy Markdown
Contributor

Options menu sliders use their local deltaTime values to determine the fastIncrement logic, which causes issues at low framerates. Changed the logic to use a persistent variable and fixed a few related bugs (such as 1/119 dT and 1/120 INCREMENT_TIME causing two increments)

@Onaterdem Onaterdem closed this Mar 2, 2025
@Onaterdem Onaterdem reopened this Mar 2, 2025
@Onaterdem Onaterdem changed the title Slider fix Fix Options Menu sliders being frame-dependent at lower framerates Mar 2, 2025
@DeaTh-G DeaTh-G added this to the v1.0.2 milestone Mar 4, 2025
@DeaTh-G
DeaTh-G requested a review from DarioSamo March 5, 2025 05:24
@DeaTh-G

DeaTh-G commented Mar 5, 2025

Copy link
Copy Markdown
Contributor

@DarioSamo marked you for reviews as I think your expertise regarding frame rate dependent bugs could be used here.

@blueskythlikesclouds blueskythlikesclouds modified the milestones: v1.0.2, v1.0.3 Mar 7, 2025
Comment thread UnleashedRecomp/ui/options_menu.cpp Outdated

@DarioSamo DarioSamo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested it personally but changes look good other than needing to address the comment I left, which was a problem with the original code.

@DarioSamo

Copy link
Copy Markdown
Contributor

Framerate independence looks good to me. Double checking that someone else tests if it works as intended.

Comment thread UnleashedRecomp/ui/options_menu.cpp Outdated
@blueskythlikesclouds
blueskythlikesclouds merged commit 2322b75 into hedge-dev:main Mar 24, 2025
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.

5 participants