static MDFN_COLD void Cleanup(void) { for(std::vector<EXPSOUND>::iterator ep = GameExpSound.begin(); ep != GameExpSound.end(); ep++) { if(ep->Kill) ep->Kill(); } GameExpSound.clear(); if(GameInterface.Kill) GameInterface.Kill(); memset(&GameInterface, 0, sizeof(GameInterface)); Genie_Kill(); MDFNSND_Close(); MDFNPPU_Close(); }
static void CloseGame(void) { for(std::vector<EXPSOUND>::iterator ep = GameExpSound.begin(); ep != GameExpSound.end(); ep++) if(ep->Kill) ep->Kill(); GameExpSound.clear(); if(GameInterface) { if(GameInterface->Close) GameInterface->Close(); free(GameInterface); GameInterface = NULL; } Genie_Kill(); MDFNSND_Close(); MDFNPPU_Close(); }