Improved reader/writer error handling.

This commit is contained in:
Branimir Karadžić
2016-01-31 16:00:02 -08:00
parent d53b27d353
commit 016bfc4290
11 changed files with 63 additions and 52 deletions

View File

@@ -112,10 +112,10 @@ namespace bgfx
strcat(filePath, ".tga");
bx::CrtFileWriter writer;
if (0 == writer.open(filePath) )
if (bx::open(&writer, filePath) )
{
imageWriteTga(&writer, _width, _height, _pitch, _data, false, _yflip);
writer.close();
bx::close(&writer);
}
#endif // BX_CONFIG_CRT_FILE_READER_WRITER
}