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

SDL3_net returns negative values on failure #111

Closed
madebr opened this issue Oct 23, 2024 · 3 comments
Closed

SDL3_net returns negative values on failure #111

madebr opened this issue Oct 23, 2024 · 3 comments
Assignees

Comments

@madebr
Copy link
Contributor

madebr commented Oct 23, 2024

A few SDL3_net functions return negative values on failure.
These should probably be changed into returning false on failure.

@icculus icculus self-assigned this Oct 23, 2024
@icculus
Copy link
Collaborator

icculus commented Oct 24, 2024

This turned out to be only a few of the functions.

Most of the things returning int are doing -1==failure, 1==success, 0==wouldblock.

These sort of three-state return codes moved to enums in SDL3 (SDL_AppResult, SDL_EnumResult, etc), and we should maybe do that here, too.

@madebr
Copy link
Contributor Author

madebr commented Oct 24, 2024

Indeed, let's create an issue for that so we don't forget about it.

@icculus
Copy link
Collaborator

icculus commented Oct 24, 2024

Done!

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

No branches or pull requests

2 participants