performance improvements

* no more freezes because of file IO from hard disk, now we cache sound/spr file buffers
* more opengl painter tweaks
This commit is contained in:
Eduardo Bart
2012-04-24 18:05:46 -03:00
parent ee664657fb
commit 9aa12acc22
11 changed files with 168 additions and 37 deletions

View File

@@ -37,6 +37,9 @@ SoundFilePtr SoundFile::loadSoundFile(const std::string& filename)
return nullptr;
}
// cache file buffer to avoid lags from hard drive
file->cache();
char magic[4];
file->read(magic, 4);
file->seek(0);