Skip to content

Commit

Permalink
add warning log multiple of 4 (#4080)
Browse files Browse the repository at this point in the history
  • Loading branch information
CrackedPixel committed Jun 22, 2024
1 parent e7acdd1 commit 0d59235
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/external/rl_gputex.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ void *rl_load_dds_from_memory(const unsigned char *file_data, unsigned int file_

*width = header->width;
*height = header->height;

if (*width % 4 != 0) LOG("WARNING: IMAGE: DDS file width must be multiple of 4. Image will not display correctly");
if (*height % 4 != 0) LOG("WARNING: IMAGE: DDS file height must be multiple of 4. Image will not display correctly");

image_pixel_size = header->width*header->height;

if (header->mipmap_count == 0) *mips = 1; // Parameter not used
Expand Down

0 comments on commit 0d59235

Please sign in to comment.