Explorar o código

Update rl_gputex.h

Ray %!s(int64=2) %!d(string=hai) anos
pai
achega
4647441ad8
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      src/external/rl_gputex.h

+ 3 - 3
src/external/rl_gputex.h

@@ -477,10 +477,10 @@ int rl_save_ktx(const char *file_name, void *data, int width, int height, int fo
     // Calculate file data_size required
     int data_size = sizeof(ktx_header);
 
-    for (int i = 0, width = width, height = height; i < mipmaps; i++)
+    for (int i = 0, w = width, h = height; i < mipmaps; i++)
     {
-        data_size += get_pixel_data_size(width, height, format);
-        width /= 2; height /= 2;
+        data_size += get_pixel_data_size(w, h, format);
+        w /= 2; h /= 2;
     }
 
     unsigned char *file_data = RL_CALLOC(data_size, 1);