mojoshader_preprocessor.c
changeset 1195 f4ef8606c68d
parent 1188 25000edc0176
equal deleted inserted replaced
1194:3948d7f5b4ff 1195:f4ef8606c68d
   199 
   199 
   200 
   200 
   201 
   201 
   202 #if !MOJOSHADER_FORCE_INCLUDE_CALLBACKS
   202 #if !MOJOSHADER_FORCE_INCLUDE_CALLBACKS
   203 
   203 
   204 // !!! FIXME: most of these _MSC_VER should probably be _WINDOWS?
   204 #ifdef _WIN32
   205 #ifdef _MSC_VER
       
   206 #define WIN32_LEAN_AND_MEAN 1
   205 #define WIN32_LEAN_AND_MEAN 1
   207 #include <windows.h>  // GL headers need this for WINGDIAPI definition.
   206 #include <windows.h>  // GL headers need this for WINGDIAPI definition.
   208 #else
   207 #else
   209 #include <sys/stat.h>
   208 #include <sys/stat.h>
   210 #include <fcntl.h>
   209 #include <fcntl.h>
   216                                      const char **outdata,
   215                                      const char **outdata,
   217                                      unsigned int *outbytes,
   216                                      unsigned int *outbytes,
   218                                      MOJOSHADER_malloc m, MOJOSHADER_free f,
   217                                      MOJOSHADER_malloc m, MOJOSHADER_free f,
   219                                      void *d)
   218                                      void *d)
   220 {
   219 {
   221 #ifdef _MSC_VER
   220 #ifdef _WIN32
   222     WCHAR wpath[MAX_PATH];
   221     WCHAR wpath[MAX_PATH];
   223     if (!MultiByteToWideChar(CP_UTF8, 0, fname, -1, wpath, MAX_PATH))
   222     if (!MultiByteToWideChar(CP_UTF8, 0, fname, -1, wpath, MAX_PATH))
   224         return 0;
   223         return 0;
   225 
   224 
   226     const DWORD share = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;
   225     const DWORD share = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;