MCPcopy Create free account
hub / github.com/DentonW/DevIL / ilIsValidDds

Function ilIsValidDds

DevIL/src-IL/src/il_dds.cpp:52–72  ·  view source on GitHub ↗

Checks if the file specified in FileName is a valid .dds file.

Source from the content-addressed store, hash-verified

50
51//! Checks if the file specified in FileName is a valid .dds file.
52ILboolean ilIsValidDds(ILconst_string FileName)
53{
54 ILHANDLE DdsFile;
55 ILboolean bDds = IL_FALSE;
56
57 if (!iCheckExtension(FileName, IL_TEXT("dds"))) {
58 ilSetError(IL_INVALID_EXTENSION);
59 return bDds;
60 }
61
62 DdsFile = iopenr(FileName);
63 if (DdsFile == NULL) {
64 ilSetError(IL_COULD_NOT_OPEN_FILE);
65 return bDds;
66 }
67
68 bDds = ilIsValidDdsF(DdsFile);
69 icloser(DdsFile);
70
71 return bDds;
72}
73
74
75//! Checks if the ILHANDLE contains a valid .dds file at the current position.

Callers 1

ILAPIENTRY ilIsValidFunction · 0.85

Calls 3

iCheckExtensionFunction · 0.85
ilSetErrorFunction · 0.85
ilIsValidDdsFFunction · 0.85

Tested by

no test coverage detected