snes9xgit / snes9x

Snes9x - Portable Super Nintendo Entertainment System (TM) emulator
http://www.snes9x.com
Other
2.65k stars 457 forks source link

MSU-1 unload audio/data files on ROM unload #152

Closed qwertymodo closed 7 years ago

qwertymodo commented 7 years ago

I'm trying to dig through the code myself, but not finding anywhere that does cleanup after closing a ROM (i.e. loading a different game), but wherever that is, we should probably add in an unload function to msu1.cpp to release the file handles on the data and audio file, and call that when closing the ROM. Otherwise, the only way to release those handles is to load another MSU-1 game or close the emulator entirely.

OV2 commented 7 years ago

There isn't really any unload function, so I'd do this in S9xReset. Release them every time, and then init is only called if it is a msu1 game.

qwertymodo commented 7 years ago

Fixed in https://github.com/snes9xgit/snes9x/commit/907cf3efa8e9f2d0de4f17539e39abbb9ecc2969