mirror of https://github.com/stella-emu/stella.git
Fixed "new console created" messages appearing when loading a ROM
from the launcher. This message should only appear when *reloading* a ROM, not creating a new one completely. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2662 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
5d5719e390
commit
2bde61558d
|
@ -16,6 +16,9 @@
|
|||
|
||||
* Disassembly from debugger ...
|
||||
|
||||
* Fixed redundant "New console created" message when entering the same
|
||||
ROM multiple times from the ROM launcher.
|
||||
|
||||
-Have fun!
|
||||
|
||||
|
||||
|
|
|
@ -501,17 +501,16 @@ void OSystem::createSound()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool OSystem::createConsole(const FilesystemNode& rom, const string& md5sum)
|
||||
bool OSystem::createConsole(const FilesystemNode& rom, const string& md5sum,
|
||||
bool newrom)
|
||||
{
|
||||
ostringstream buf;
|
||||
|
||||
// Do a little error checking; it shouldn't be necessary
|
||||
if(myConsole) deleteConsole();
|
||||
|
||||
bool showmessage = false;
|
||||
|
||||
// If same ROM has been given, we reload the current one (assuming one exists)
|
||||
if(rom == myRomFile)
|
||||
if(!newrom && rom == myRomFile)
|
||||
{
|
||||
showmessage = true; // we show a message if a ROM is being reloaded
|
||||
}
|
||||
|
@ -527,6 +526,7 @@ bool OSystem::createConsole(const FilesystemNode& rom, const string& md5sum)
|
|||
}
|
||||
|
||||
// Create an instance of the 2600 game console
|
||||
ostringstream buf;
|
||||
string type, id;
|
||||
myConsole = openConsole(myRomFile, myRomMD5, type, id);
|
||||
if(myConsole)
|
||||
|
@ -617,7 +617,7 @@ void OSystem::deleteConsole()
|
|||
bool OSystem::reloadConsole()
|
||||
{
|
||||
deleteConsole();
|
||||
return createConsole(myRomFile);
|
||||
return createConsole(myRomFile, myRomMD5, false);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -375,10 +375,12 @@ class OSystem
|
|||
|
||||
@param rom The FSNode of the ROM to use (contains path, etc)
|
||||
@param md5 The MD5sum of the ROM
|
||||
@param newrom Whether this is a new ROM, or a reload of current one
|
||||
|
||||
@return True on successful creation, otherwise false
|
||||
*/
|
||||
bool createConsole(const FilesystemNode& rom, const string& md5 = "");
|
||||
bool createConsole(const FilesystemNode& rom, const string& md5 = "",
|
||||
bool newrom = true);
|
||||
|
||||
/**
|
||||
Deletes the currently defined console, if it exists.
|
||||
|
|
Loading…
Reference in New Issue