freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] * builds/windows/ftsystem.c (FT_Stream_


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] * builds/windows/ftsystem.c (FT_Stream_Open): Support legacy Windows.
Date: Fri, 20 Aug 2021 02:17:08 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

1 changed file:

Changes:

  • builds/windows/ftsystem.c
    ... ... @@ -226,7 +226,15 @@
    226 226
           return FT_THROW( Cannot_Open_Resource );
    
    227 227
         }
    
    228 228
     
    
    229
    +#if defined _WIN32_WCE || defined _WIN32_WINDOWS || \
    
    230
    +    (defined _WIN32_WINNT && _WIN32_WINNT <= 0x0400)
    
    231
    +    /* Use GetFileSize() for legacy Windows */
    
    232
    +    size.u.LowPart = GetFileSize( file, (DWORD *)&size.u.HighPart );
    
    233
    +    if ( size.u.LowPart == INVALID_FILE_SIZE && GetLastError() != NO_ERROR )
    
    234
    +#else
    
    235
    +    /* Use GetFileSizeEx() for modern Windows */
    
    229 236
         if ( GetFileSizeEx( file, &size ) == FALSE )
    
    237
    +#endif
    
    230 238
         {
    
    231 239
           FT_ERROR(( "FT_Stream_Open:" ));
    
    232 240
           FT_ERROR(( " could not retrieve size of file `%s'\n", filepathname ));
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]