فهرست منبع

rwops: Use SetFilePointerEx on Windows for appending writes.

Fixes #7900.

(cherry picked from commit 769bf2ebcca8f0cbcde4ec50008942f4eda57f4a)
Ryan C. Gordon 2 سال پیش
والد
کامیت
cd662ceb54
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      src/file/SDL_rwops.c

+ 3 - 2
src/file/SDL_rwops.c

@@ -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 (context->hidden.windowsio.append) {
-        if (SetFilePointer(context->hidden.windowsio.h, 0L, NULL, FILE_END) ==
-            INVALID_SET_FILE_POINTER) {
+        LARGE_INTEGER windowsoffset;
+        windowsoffset.QuadPart = 0;
+        if (!SetFilePointerEx(context->hidden.windowsio.h, windowsoffset, &windowsoffset, FILE_END)) {
             SDL_Error(SDL_EFWRITE);
             return 0;
         }