unsigned int CFileUtils::LoadFile(const std::string &filename, void* &outputBuffer) { XFILE::auto_buffer buffer; XFILE::CFile file; const unsigned int total_read = file.LoadFile(filename, buffer); outputBuffer = buffer.detach(); return total_read; }
bool CJpegIO::Open(const CStdString &texturePath, unsigned int minx, unsigned int miny, bool read) { Close(); m_texturePath = texturePath; XFILE::CFile file; XFILE::auto_buffer buf; if (file.LoadFile(texturePath, buf) <= 0) return false; m_inputBuffSize = buf.size(); m_inputBuff = (unsigned char*)buf.detach(); return Read(m_inputBuff, m_inputBuffSize, minx, miny); }