Merged 1855 and 1861

This commit is contained in:
yabause 2009-04-08 22:27:21 +00:00
parent 242c3d7baf
commit 2c2cfadad0
2 changed files with 7 additions and 3 deletions

View File

@ -181,11 +181,15 @@ void mc_reset_com(memory_chip_t *mc)
}
else if ((mc->com == BM_CMD_WRITELOW) || (mc->com == FW_CMD_PAGEWRITE))
{
if(!mc->fp)
mc->fp = fopen(mc->filename, "wb+");
if (mc->fp)
{
fseek(mc->fp, 0, SEEK_SET);
elems_written += fwrite((void *)mc->data, 1, mc->size, mc->fp); // fix me
elems_written += fwrite((void *)mc->data, 1, mc->size, mc->fp); // FIXME
}
// FIXME: desmume silently ignores not having opened save-file
mc->write_enable = FALSE;
}

View File

@ -9,7 +9,7 @@ desmume_SOURCES = \
CWindow.cpp CWindow.h \
disView.cpp disView.h ginfo.cpp ginfo.h \
IORegView.cpp IORegView.h \
main.cpp mapView.cpp mapView.h memView.cpp memView.h \
main.cpp main.h mapView.cpp mapView.h memView.cpp memView.h \
oamView.cpp oamView.h palView.cpp palView.h \
resource.h \
snddx.cpp snddx.h \
@ -23,7 +23,7 @@ desmume_SOURCES = \
inputdx.cpp inputdx.h ogl.cpp \
throttle.cpp throttle.h windriver.h \
cheatsWin.cpp cheatsWin.h gbaslot_config.cpp gbaslot_config.h \
mic.cpp \
mic.cpp hotkey.cpp hotkey.h \
DeSmuME_2005.vcproj DeSmuME_2008.vcproj \
DeSmuME_Intel.icproj DeSmuME_Intel.vcproj DeSmuME_Intel.sln \
DeSmuME_x64.manifest DeSmuME_x86.manifest