Skip to content

Changed frames/ms types from Uint64 to Sint64 #718

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

Merged
merged 5 commits into from
Jul 29, 2025

Conversation

Sackzement
Copy link
Contributor

This is the first draft for converting the parameter types of of frames/ms for the conversion functions and the MIX_SetTrackPlaybackPosition() function from Uint64 to Sint64.

Conversion functions now return -1 on error and set a message.
Negative frame/ms arguments are not allowed.

TODO:
Comments could use a little more tweaking.

Maybe?:
Allow converting negative frames/ms so that negative return values can be used in arithmetic expressions? (return value on error would then be 0 again)

Closes #711

Necessary so that the behavior is the same as when the return value was 0 on error.
@icculus
Copy link
Collaborator

icculus commented Jul 29, 2025

Allow converting negative frames/ms so that negative return values can be used in arithmetic expressions?

I was thinking about this, too...but let's merge this for now and we can consider that separately.

@icculus icculus merged commit 331080b into libsdl-org:main Jul 29, 2025
5 checks passed
@Sackzement Sackzement deleted the frames_Sint64 branch July 29, 2025 20:39
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.

Use type Sint64 for frames/milliseconds
2 participants