diff --git a/include/SDL_rwops.h b/include/SDL_rwops.h index 919bd3c18..61f78df33 100644 --- a/include/SDL_rwops.h +++ b/include/SDL_rwops.h @@ -115,7 +115,8 @@ extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file, const char *mode); #ifdef HAVE_STDIO_H -extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp, int autoclose); +extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp, + SDL_bool autoclose); #endif extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size); diff --git a/src/file/SDL_rwops.c b/src/file/SDL_rwops.c index efe4d288d..4fc3a7fda 100644 --- a/src/file/SDL_rwops.c +++ b/src/file/SDL_rwops.c @@ -124,7 +124,7 @@ win32_file_open(SDL_RWops * context, const char *filename, const char *mode) return -2; /* failed (CreateFile) */ } context->hidden.win32io.h = h; - context->hidden.win32io.append = a_mode; + context->hidden.win32io.append = a_mode ? SDL_TRUE : SDL_FALSE; return 0; /* ok */ } @@ -455,7 +455,7 @@ SDL_RWFromFile(const char *file, const char *mode) #ifdef HAVE_STDIO_H SDL_RWops * -SDL_RWFromFP(FILE * fp, int autoclose) +SDL_RWFromFP(FILE * fp, SDL_bool autoclose) { SDL_RWops *rwops = NULL;