Fixed a last-minute bug with StellaX not showing a game in the gamelist

if it didn't have an entry in the stella.pro file.

It never ends ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@325 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2004-07-17 19:34:01 +00:00
parent 2ff215b543
commit cd1e2fb4dc
1 changed files with 10 additions and 10 deletions

View File

@ -14,7 +14,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: MainDlg.cxx,v 1.7 2004-07-15 03:03:27 stephena Exp $
// $Id: MainDlg.cxx,v 1.8 2004-07-17 19:34:01 stephena Exp $
//============================================================================
#include "pch.hxx"
@ -635,14 +635,14 @@ bool MainDlg::LoadRomListFromDisk()
// Get the MD5sum for this rom
// Use it to lookup the rom in the properties set
string rom = romdir + g->rom();
ifstream in(rom.c_str(), ios_base::binary);
if(!in)
return false;
uInt8* image = new uInt8[512 * 1024];
in.read((char*)image, 512 * 1024);
uInt32 size = in.gcount();
in.close();
string rom = romdir + g->rom();
ifstream in(rom.c_str(), ios_base::binary);
if(!in)
return false;
uInt8* image = new uInt8[512 * 1024];
in.read((char*)image, 512 * 1024);
uInt32 size = in.gcount();
in.close();
string md5 = MD5( image, size );
delete[] image;
@ -658,7 +658,7 @@ bool MainDlg::LoadRomListFromDisk()
strncpy(rarity, props.get("Cartridge.Rarity").c_str(), 255);
// Make sure the onscreen 'Name' field isn't blank
if(props.get("Cartridge.Name") == "")
if(props.get("Cartridge.Name") == "Untitled")
strncpy(name, g->name().c_str(), 255);
// Update the current game