Commit cd1e2fb4 authored by stephena's avatar stephena
Browse files

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
parent 2ff215b5
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment