mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-07-08 07:10:44 +00:00
rwops: Use SetFilePointerEx on Windows for appending writes.
Fixes #7900.
This commit is contained in:
parent
fc0854651b
commit
769bf2ebcc
|
@ -277,8 +277,9 @@ windows_file_write(SDL_RWops *context, const void *ptr, size_t size,
|
||||||
|
|
||||||
/* if in append mode, we must go to the EOF before write */
|
/* if in append mode, we must go to the EOF before write */
|
||||||
if (context->hidden.windowsio.append) {
|
if (context->hidden.windowsio.append) {
|
||||||
if (SetFilePointer(context->hidden.windowsio.h, 0L, NULL, FILE_END) ==
|
LARGE_INTEGER windowsoffset;
|
||||||
INVALID_SET_FILE_POINTER) {
|
windowsoffset.QuadPart = 0;
|
||||||
|
if (!SetFilePointerEx(context->hidden.windowsio.h, windowsoffset, &windowsoffset, FILE_END)) {
|
||||||
SDL_Error(SDL_EFWRITE);
|
SDL_Error(SDL_EFWRITE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue