Skip to content

Conversation

kyle-sylvestre
Copy link
Contributor

windows_file_read is checking EOF using the asynchronous method instead of the synchronous method.
https://learn.microsoft.com/en-us/windows/win32/fileio/testing-for-the-end-of-a-file

@slouken slouken merged commit 3876ce3 into libsdl-org:main Sep 17, 2025
41 checks passed
@slouken
Copy link
Collaborator

slouken commented Sep 17, 2025

Merged, thanks!

@icculus
Copy link
Collaborator

icculus commented Sep 18, 2025

Hmm, I wonder if this will fix the Windows-only loader bug in SDL3_mixer...

@kyle-sylvestre
Copy link
Contributor Author

If it's WAV related then yes. My WAV's stopped playing after I updated SDL and I tracked it down to this block in decoder_wav.c:

        if (!SDL_ReadU32LE(io, &chunk_type) || !SDL_ReadU32LE(io, &chunk_length)) {
            if (SDL_GetIOStatus(io) == SDL_IO_STATUS_EOF) {
                break;
            }
            return false;
        }

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.

3 participants