summaryrefslogtreecommitdiff
path: root/src/file
diff options
context:
space:
mode:
authorDavid Ludwig <dludwig@pobox.com>2013-10-27 21:26:46 -0400
committerDavid Ludwig <dludwig@pobox.com>2013-10-27 21:26:46 -0400
commit529fcd3ee3a7f5fb09f31f30eeac72848a50b129 (patch)
treed3667c5da39b896d939f6bc24d7cfc3114322c7c /src/file
parent4fb2b75ec9ebe3d8af5cb435526649ff31b5c2f9 (diff)
parente1968a60e067d03f9b09a1abcfc4cbae7a07429c (diff)
WinRT: merged with SDL 2.0.1 codebase
Diffstat (limited to 'src/file')
-rw-r--r--src/file/SDL_rwops.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/file/SDL_rwops.c b/src/file/SDL_rwops.c
index 3a6f7db66f..73e9846aae 100644
--- a/src/file/SDL_rwops.c
+++ b/src/file/SDL_rwops.c
@@ -22,6 +22,11 @@
#define _LARGEFILE64_SOURCE
#include "SDL_config.h"
+#if defined(__WIN32__)
+#include "../core/windows/SDL_windows.h"
+#endif
+
+
/* This file provides a general interface for SDL to read and write
data sources. It can easily be extended to files, memory, etc.
*/
@@ -42,8 +47,6 @@
/* Functions to read/write Win32 API file pointers */
-#include "../core/windows/SDL_windows.h"
-
#ifndef INVALID_SET_FILE_POINTER
#define INVALID_SET_FILE_POINTER 0xFFFFFFFF
#endif
@@ -275,10 +278,8 @@ windows_file_close(SDL_RWops * context)
CloseHandle(context->hidden.windowsio.h);
context->hidden.windowsio.h = INVALID_HANDLE_VALUE; /* to be sure */
}
- if (context->hidden.windowsio.buffer.data) {
- SDL_free(context->hidden.windowsio.buffer.data);
- context->hidden.windowsio.buffer.data = NULL;
- }
+ SDL_free(context->hidden.windowsio.buffer.data);
+ context->hidden.windowsio.buffer.data = NULL;
SDL_FreeRW(context);
}
return (0);