From b0957f34fe1dd821e4ecf01a656e23fd02e09e2b Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Tue, 21 Jan 2014 20:53:43 -0800 Subject: [PATCH] Enable screen shot save when CRT file is present. --- src/bgfx.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 77b5bd27d..56f31e512 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -100,7 +100,8 @@ namespace bgfx virtual void screenShot(const char* _filePath, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _data, uint32_t _size, bool _yflip) BX_OVERRIDE { BX_UNUSED(_filePath, _width, _height, _pitch, _data, _size, _yflip); -#if 0 + +#if BX_CONFIG_CRT_FILE_READER_WRITER char* filePath = (char*)alloca(strlen(_filePath)+5); strcpy(filePath, _filePath); strcat(filePath, ".tga"); @@ -111,7 +112,7 @@ namespace bgfx imageWriteTga(&writer, _width, _height, _pitch, _data, false, _yflip); writer.close(); } -#endif // 0 +#endif // BX_CONFIG_CRT_FILE_READER_WRITER } virtual void captureBegin(uint32_t /*_width*/, uint32_t /*_height*/, uint32_t /*_pitch*/, TextureFormat::Enum /*_format*/, bool /*_yflip*/) BX_OVERRIDE