Fixed DDS loader according to issue #22530

width and height attributes have to be switched according to the
official DDS header docs:
https://docs.microsoft.com/en-us/windows/desktop/direct3ddds/dds-header

(cherry picked from commit a93edeb307)
This commit is contained in:
qonnop 2018-10-03 17:03:19 +02:00 committed by Rémi Verschelde
parent 661885dbd8
commit b9ee398cbc
1 changed files with 1 additions and 1 deletions

View File

@ -108,8 +108,8 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path,
uint32_t magic = f->get_32(); uint32_t magic = f->get_32();
uint32_t hsize = f->get_32(); uint32_t hsize = f->get_32();
uint32_t flags = f->get_32(); uint32_t flags = f->get_32();
uint32_t width = f->get_32();
uint32_t height = f->get_32(); uint32_t height = f->get_32();
uint32_t width = f->get_32();
uint32_t pitch = f->get_32(); uint32_t pitch = f->get_32();
/* uint32_t depth = */ f->get_32(); /* uint32_t depth = */ f->get_32();
uint32_t mipmaps = f->get_32(); uint32_t mipmaps = f->get_32();