add saveSavedata method. based on patch from Robert Broglia.

git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@341 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
This commit is contained in:
sinamas 2012-09-04 20:07:35 +00:00
parent 80a1dbc052
commit cb03e9c355
2 changed files with 8 additions and 0 deletions

View File

@ -91,6 +91,9 @@ public:
/** Returns true if a ROM image is loaded. */
bool isLoaded() const;
/** Writes persistent cartridge data to disk. Done implicitly on ROM close. */
void saveSavedata();
/** Saves emulator state to the state slot selected with selectState().
* The data will be stored in the directory given by setSaveDir().
*

View File

@ -116,6 +116,11 @@ bool GB::isLoaded() const {
return p_->cpu.loaded();
}
void GB::saveSavedata() {
if (p_->cpu.loaded())
p_->cpu.saveSavedata();
}
void GB::setDmgPaletteColor(unsigned palNum, unsigned colorNum, unsigned rgb32) {
p_->cpu.setDmgPaletteColor(palNum, colorNum, rgb32);
}