mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-26 10:21:53 +00:00
Renamed SDL_SizeIO() SDL_GetIOSize()
This commit is contained in:
committed by
Ryan C. Gordon
parent
df0f5deddf
commit
a1a0156756
@@ -469,7 +469,7 @@ SDL3_0.0.0 {
|
||||
SDL_IOFromMem;
|
||||
SDL_ReadIO;
|
||||
SDL_SeekIO;
|
||||
SDL_SizeIO;
|
||||
SDL_GetIOSize;
|
||||
SDL_TellIO;
|
||||
SDL_WriteIO;
|
||||
SDL_RaiseWindow;
|
||||
|
||||
@@ -493,7 +493,7 @@
|
||||
#define SDL_IOFromMem SDL_IOFromMem_REAL
|
||||
#define SDL_ReadIO SDL_ReadIO_REAL
|
||||
#define SDL_SeekIO SDL_SeekIO_REAL
|
||||
#define SDL_SizeIO SDL_SizeIO_REAL
|
||||
#define SDL_GetIOSize SDL_GetIOSize_REAL
|
||||
#define SDL_TellIO SDL_TellIO_REAL
|
||||
#define SDL_WriteIO SDL_WriteIO_REAL
|
||||
#define SDL_RaiseWindow SDL_RaiseWindow_REAL
|
||||
|
||||
@@ -538,7 +538,7 @@ SDL_DYNAPI_PROC(SDL_IOStream*,SDL_IOFromFile,(const char *a, const char *b),(a,b
|
||||
SDL_DYNAPI_PROC(SDL_IOStream*,SDL_IOFromMem,(void *a, size_t b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_ReadIO,(SDL_IOStream *a, void *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(Sint64,SDL_SeekIO,(SDL_IOStream *a, Sint64 b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(Sint64,SDL_SizeIO,(SDL_IOStream *a),(a),return)
|
||||
SDL_DYNAPI_PROC(Sint64,SDL_GetIOSize,(SDL_IOStream *a),(a),return)
|
||||
SDL_DYNAPI_PROC(Sint64,SDL_TellIO,(SDL_IOStream *a),(a),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_WriteIO,(SDL_IOStream *a, const void *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RaiseWindow,(SDL_Window *a),(a),return)
|
||||
|
||||
@@ -415,7 +415,7 @@ static SDL_IOStream *SDL_IOFromFP(FILE *fp, SDL_bool autoclose)
|
||||
|
||||
SDL_IOStreamInterface iface;
|
||||
SDL_zero(iface);
|
||||
// There's no stdio_size because SDL_SizeIO emulates it the same way we'd do it for stdio anyhow.
|
||||
// There's no stdio_size because SDL_GetIOSize emulates it the same way we'd do it for stdio anyhow.
|
||||
iface.seek = stdio_seek;
|
||||
iface.read = stdio_read;
|
||||
iface.write = stdio_write;
|
||||
@@ -886,7 +886,7 @@ void *SDL_LoadFile_IO(SDL_IOStream *src, size_t *datasize, SDL_bool closeio)
|
||||
goto done;
|
||||
}
|
||||
|
||||
size = SDL_SizeIO(src);
|
||||
size = SDL_GetIOSize(src);
|
||||
if (size < 0) {
|
||||
size = FILE_CHUNK_SIZE;
|
||||
loading_chunks = SDL_TRUE;
|
||||
@@ -958,7 +958,7 @@ SDL_PropertiesID SDL_GetIOProperties(SDL_IOStream *context)
|
||||
return context->props;
|
||||
}
|
||||
|
||||
Sint64 SDL_SizeIO(SDL_IOStream *context)
|
||||
Sint64 SDL_GetIOSize(SDL_IOStream *context)
|
||||
{
|
||||
if (!context) {
|
||||
return SDL_InvalidParamError("context");
|
||||
|
||||
@@ -1904,7 +1904,7 @@ static const void *SDLTest_ScreenShotClipboardProvider(void *context, const char
|
||||
|
||||
file = SDL_IOFromFile(SCREENSHOT_FILE, "r");
|
||||
if (file) {
|
||||
size_t length = (size_t)SDL_SizeIO(file);
|
||||
size_t length = (size_t)SDL_GetIOSize(file);
|
||||
void *image = SDL_malloc(length);
|
||||
if (image) {
|
||||
if (SDL_ReadIO(file, image, length) != length) {
|
||||
|
||||
Reference in New Issue
Block a user