Bug in MAME 0.109u1 !

This forum is for making announcements about updated cheat files (for any emulator), updated web pages and of course about improvements to the MAME/MESS cheat engine.
Locked
User avatar
stephh
Posts: 648
Joined: Fri Aug 17, 2001 1:00 am
Location: Paris, France

Bug in MAME 0.109u1 !

Post by stephh » Sat Oct 07, 2006 11:52 am

When you save cheats, the file is created, so ALL other cheats (from ALL games) are LOST !

Image Steph from The Ultimate Patchers Image

User avatar
stephh
Posts: 648
Joined: Fri Aug 17, 2001 1:00 am
Location: Paris, France

Post by stephh » Sun Oct 08, 2006 9:36 pm

If you can't wait for MAME 0.109u2, use the following fix ...

In src/cheat.c, in static void SaveCheat(CheatEntry * entry) function, replace :

Code: Select all

	filerr = mame_fopen(SEARCHPATH_CHEAT, mainDatabaseName, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &theFile);
with :

Code: Select all

	filerr = mame_fopen(SEARCHPATH_CHEAT, mainDatabaseName, OPEN_FLAG_WRITE, &theFile);
	if (filerr != FILERR_NONE)
		filerr = mame_fopen(SEARCHPATH_CHEAT, mainDatabaseName, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &theFile);
Thanks Aaron ! 8)

Image Steph from The Ultimate Patchers Image

Locked