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

SDL_rwops.c: stdio_seek - skip API call for RW_SEEK_CUR with 0 offset #10560

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

ds-sloth
Copy link
Contributor

Description

This is the SDL2 side of a PR optimizing the stdio implementation of SDL_RWseek(..., 0, RW_SEEK_CUR).

I did not change any implementations other than stdio because I am confident that fseek(fp, 0, SEEK_CUR) is a no-op, and I'm not certain about the other implementations. It's also possible that the underlying API is better optimized on other platforms, but we have a confirmed 1-minute hang on 3DS resulting from fseek getting called by SDL_RWtell.

Please feel free to alter my branch, it exists only for the sake of this PR.

Existing Issue(s)

#10556 (fixes SDL2 side only)

src/file/SDL_rwops.c Outdated Show resolved Hide resolved
@icculus icculus merged commit 2824d13 into libsdl-org:SDL2 Aug 16, 2024
40 checks passed
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