mirror of https://github.com/stella-emu/stella.git
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:
parent
2ff215b543
commit
cd1e2fb4dc
|
@ -14,7 +14,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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"
|
#include "pch.hxx"
|
||||||
|
@ -635,14 +635,14 @@ bool MainDlg::LoadRomListFromDisk()
|
||||||
|
|
||||||
// Get the MD5sum for this rom
|
// Get the MD5sum for this rom
|
||||||
// Use it to lookup the rom in the properties set
|
// Use it to lookup the rom in the properties set
|
||||||
string rom = romdir + g->rom();
|
string rom = romdir + g->rom();
|
||||||
ifstream in(rom.c_str(), ios_base::binary);
|
ifstream in(rom.c_str(), ios_base::binary);
|
||||||
if(!in)
|
if(!in)
|
||||||
return false;
|
return false;
|
||||||
uInt8* image = new uInt8[512 * 1024];
|
uInt8* image = new uInt8[512 * 1024];
|
||||||
in.read((char*)image, 512 * 1024);
|
in.read((char*)image, 512 * 1024);
|
||||||
uInt32 size = in.gcount();
|
uInt32 size = in.gcount();
|
||||||
in.close();
|
in.close();
|
||||||
string md5 = MD5( image, size );
|
string md5 = MD5( image, size );
|
||||||
delete[] image;
|
delete[] image;
|
||||||
|
|
||||||
|
@ -658,7 +658,7 @@ bool MainDlg::LoadRomListFromDisk()
|
||||||
strncpy(rarity, props.get("Cartridge.Rarity").c_str(), 255);
|
strncpy(rarity, props.get("Cartridge.Rarity").c_str(), 255);
|
||||||
|
|
||||||
// Make sure the onscreen 'Name' field isn't blank
|
// 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);
|
strncpy(name, g->name().c_str(), 255);
|
||||||
|
|
||||||
// Update the current game
|
// Update the current game
|
||||||
|
|
Loading…
Reference in New Issue