rwops: Renamed SDL_CreateRW and SDL_DestroyRW to SDL_OpenRW and SDL_CloseRW.

This commit is contained in:
Ryan C. Gordon
2024-03-12 09:01:37 -04:00
parent 525919b315
commit 655ceb3b31
22 changed files with 81 additions and 95 deletions

View File

@@ -117,7 +117,7 @@ int main(int argc, char **argv)
/* write out a WAV header... */
io = SDL_RWFromFile(file_out, "wb");
if (!io) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "fopen('%s') failed: %s\n", file_out, SDL_GetError());
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "opening '%s' failed: %s\n", file_out, SDL_GetError());
ret = 5;
goto end;
}
@@ -141,8 +141,8 @@ int main(int argc, char **argv)
SDL_WriteU32LE(io, dst_len); /* size */
SDL_RWwrite(io, dst_buf, dst_len);
if (SDL_DestroyRW(io) == -1) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "fclose('%s') failed: %s\n", file_out, SDL_GetError());
if (SDL_CloseRW(io) == -1) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "closing '%s' failed: %s\n", file_out, SDL_GetError());
ret = 6;
goto end;
}