mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-07 02:16:28 +00:00
REVIEWED: GetFileExtension() to include the dot #1523
This commit is contained in:
@@ -294,7 +294,7 @@ Image LoadImageAnim(const char *fileName, int *frames)
|
||||
return image;
|
||||
}
|
||||
|
||||
// Load image from memory buffer, fileType refers to extension: i.e. "png"
|
||||
// Load image from memory buffer, fileType refers to extension: i.e. ".png"
|
||||
Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize)
|
||||
{
|
||||
Image image = { 0 };
|
||||
@@ -303,28 +303,28 @@ Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, i
|
||||
strcpy(fileExtLower, TextToLower(fileType));
|
||||
|
||||
#if defined(SUPPORT_FILEFORMAT_PNG)
|
||||
if ((TextIsEqual(fileExtLower, "png"))
|
||||
if ((TextIsEqual(fileExtLower, ".png"))
|
||||
#else
|
||||
if ((false)
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_BMP)
|
||||
|| (TextIsEqual(fileExtLower, "bmp"))
|
||||
|| (TextIsEqual(fileExtLower, ".bmp"))
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_TGA)
|
||||
|| (TextIsEqual(fileExtLower, "tga"))
|
||||
|| (TextIsEqual(fileExtLower, ".tga"))
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_JPG)
|
||||
|| (TextIsEqual(fileExtLower, "jpg") ||
|
||||
TextIsEqual(fileExtLower, "jpeg"))
|
||||
|| (TextIsEqual(fileExtLower, ".jpg") ||
|
||||
TextIsEqual(fileExtLower, ".jpeg"))
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_GIF)
|
||||
|| (TextIsEqual(fileExtLower, "gif"))
|
||||
|| (TextIsEqual(fileExtLower, ".gif"))
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_PIC)
|
||||
|| (TextIsEqual(fileExtLower, "pic"))
|
||||
|| (TextIsEqual(fileExtLower, ".pic"))
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_PSD)
|
||||
|| (TextIsEqual(fileExtLower, "psd"))
|
||||
|| (TextIsEqual(fileExtLower, ".psd"))
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
Reference in New Issue
Block a user