From 603f72d9b40ff45a126301c1da754b7f9bd0f047 Mon Sep 17 00:00:00 2001 From: bwmott Date: Sun, 15 Dec 2002 04:40:55 +0000 Subject: [PATCH] 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 --- stella/src/emucore/Console.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stella/src/emucore/Console.cxx b/stella/src/emucore/Console.cxx index d75d2c103..c83ad0d7c 100644 --- a/stella/src/emucore/Console.cxx +++ b/stella/src/emucore/Console.cxx @@ -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 @@ -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");