make timers not suck. fixes issues (Worms2 intro FMV plays at the right speed, aging cart tests get further...)

This commit is contained in:
StapleButter
2017-03-20 17:39:42 +01:00
parent f38bc94011
commit a56bf5c76c
7 changed files with 95 additions and 89 deletions

View File

@ -565,11 +565,15 @@ bool Init()
{
if (!NDSCart_SRAM::Init()) return false;
CartROM = NULL;
return true;
}
void DeInit()
{
if (CartROM) delete[] CartROM;
NDSCart_SRAM::DeInit();
}
@ -606,6 +610,8 @@ bool LoadROM(const char* path, bool direct)
// TODO: streaming mode? for really big ROMs or systems with limited RAM
// for now we're lazy
if (CartROM) delete[] CartROM;
FILE* f = fopen(path, "rb");
if (!f)
{