summaryrefslogtreecommitdiff
path: root/modules/dds/texture_loader_dds.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/dds/texture_loader_dds.cpp')
-rw-r--r--modules/dds/texture_loader_dds.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp
index a063942269..0a94690989 100644
--- a/modules/dds/texture_loader_dds.cpp
+++ b/modules/dds/texture_loader_dds.cpp
@@ -263,14 +263,14 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path,
colsize = 4;
}
- int w = width;
- int h = height;
+ int w2 = width;
+ int h2 = height;
for (uint32_t i = 1; i < mipmaps; i++) {
- w = (w + 1) >> 1;
- h = (h + 1) >> 1;
- size += w * h * info.block_size;
+ w2 = (w2 + 1) >> 1;
+ h2 = (h2 + 1) >> 1;
+ size += w2 * h2 * info.block_size;
}
src_data.resize(size + 256 * colsize);