mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
rwops: Make read and write work like POSIX, not stdio.
This simplifies some things, clarifies some things, and also allows for the possibility of RWops that offer non-blocking i/o (although none of the current built-in ones do, intentionally, we could add this later if we choose, or people could provide things like network socket RWops implementations now, etc. Fixes #6729.
This commit is contained in:
@@ -100,7 +100,7 @@ int main(int argc, char **argv)
|
||||
SDL_WriteLE16(io, bitsize); /* significant bits per sample */
|
||||
SDL_WriteLE32(io, 0x61746164); /* data */
|
||||
SDL_WriteLE32(io, cvt.len_cvt); /* size */
|
||||
SDL_RWwrite(io, cvt.buf, cvt.len_cvt, 1);
|
||||
SDL_RWwrite(io, cvt.buf, cvt.len_cvt);
|
||||
|
||||
if (SDL_RWclose(io) == -1) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "fclose('%s') failed: %s\n", argv[2], SDL_GetError());
|
||||
|
||||
Reference in New Issue
Block a user