Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with float value for "Auto Reset Cycle After" #1002

Closed
1 task done
pepper-jelly opened this issue Jul 1, 2024 · 3 comments · Fixed by #1013
Closed
1 task done

Issue with float value for "Auto Reset Cycle After" #1002

pepper-jelly opened this issue Jul 1, 2024 · 3 comments · Fixed by #1013
Labels
bug Something isn't working

Comments

@pepper-jelly
Copy link
Contributor

pepper-jelly commented Jul 1, 2024

Is there an existing issue for this?

  • I searched the existing issues and did not find anything similar.

Current Behavior

If I set Auto Reset Cycle After to 2,6 it becomes 3,2. To set to 2,6 I need to put 2,3 for some reason. After changing value I hit insert to update the block.

Expected Behavior

It saves value I've set.

Steps To Reproduce

Advanced.

Environment

*latest git build

Program Version 3.4.0
Program Compiled on Jun 30 2024 at 15:08:52
Built Against SDL 2.30.4
Running With SDL 2.30.4
Using Qt 5.15.14
Using Event Handler: XTest
Compositor type: x11
Host OS: artix Version: unknown Architecture: x86_64

Anything else?

current and couple of old releases extracted from deb packages give me the same issue as git build
for now I just edited profile manually

Scr 106


Upvote & Fund

  • If you find this issue important, mark it with 👍. It lets us see which fixes and features are demanded by the most users.
  • We're using Polar.sh so you can upvote and help fund this issue. It may incentivize some developers to contribute to this project and fix some bugs.
  • Funded developer receives the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@pepper-jelly pepper-jelly added the bug Something isn't working label Jul 1, 2024
@pepper-jelly
Copy link
Contributor Author

int milliseconds = (value * 1000) + (fmod(value, 1.0) * 1000);

Why not use just:

int milliseconds = value * 1000;

@pktiuk
Copy link
Member

pktiuk commented Jul 31, 2024

int milliseconds = (value * 1000) + (fmod(value, 1.0) * 1000);

Why not use just:

int milliseconds = value * 1000;

It was introduced in 20dbe3a and TBH I have no ide why such a strange code was written

@pktiuk
Copy link
Member

pktiuk commented Jul 31, 2024

I know now, it was bug introduced by previous maintainer. Originally it was added in 0ceb35f

unsigned int milliseconds = ((int)value * 1000) + (fmod(value, 1.0) * 1000);

And it worked

pktiuk pushed a commit that referenced this issue Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants