Added code so that the "Cartridge.MD5" property is always set once the

console is created.  If properties are not found for the ROM then the
MD5 value will be set to the MD5 value of the ROM.  This allows the
"-showinfo" command line option to display the MD5 checksum of unknown
games...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@158 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
bwmott 2002-12-15 04:40:55 +00:00
parent 890db3b3e5
commit 603f72d9b4
1 changed files with 7 additions and 1 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: Console.cxx,v 1.8 2002-11-12 01:02:16 stephena Exp $
// $Id: Console.cxx,v 1.9 2002-12-15 04:40:55 bwmott Exp $
//============================================================================
#include <assert.h>
@ -66,6 +66,12 @@ Console::Console(const uInt8* image, uInt32 size, const char* filename,
myProperties.merge(*userDefinedProperties);
}
// Make sure the MD5 value of the cartridge is set in the properties
if(myProperties.get("Cartridge.MD5") == "")
{
myProperties.set("Cartridge.MD5", md5);
}
// Setup the controllers based on properties
string left = myProperties.get("Controller.Left");
string right = myProperties.get("Controller.Right");