예제 #1
0
파일: FileUtils.cpp 프로젝트: Cygne/xbmc
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;
}
예제 #2
0
파일: JpegIO.cpp 프로젝트: Antimoni/xbmc
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);
}