From 36181b3fb27dbb15bb3468c3ebcbbbad5382d70d Mon Sep 17 00:00:00 2001 From: michi_cc Date: Thu, 19 Jul 2012 19:21:47 +0000 Subject: (svn r24417) -Codechange: [Win32] Don't needlessly include windows.h in a commonly used header. --- src/os/windows/win32.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/os/windows') diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp index 07227222a..dc38a69b3 100644 --- a/src/os/windows/win32.cpp +++ b/src/os/windows/win32.cpp @@ -89,6 +89,19 @@ void OSOpenBrowser(const char *url) * modified from Jan Wassenberg's GPL implementation posted over at * http://www.gamedev.net/community/forums/topic.asp?topic_id=364584&whichpage=1� */ +struct DIR { + HANDLE hFind; + /* the dirent returned by readdir. + * note: having only one global instance is not possible because + * multiple independent opendir/readdir sequences must be supported. */ + dirent ent; + WIN32_FIND_DATA fd; + /* since opendir calls FindFirstFile, we need a means of telling the + * first call to readdir that we already have a file. + * that's the case iff this is true */ + bool at_first_entry; +}; + /* suballocator - satisfies most requests with a reusable static instance. * this avoids hundreds of alloc/free which would fragment the heap. * To guarantee concurrency, we fall back to malloc if the instance is -- cgit v1.2.3-70-g09d2