Fixed error messages in state loading, and reverted some C++11 features

so that Stella is supported in GCC 4.8.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3144 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2015-02-06 16:34:01 +00:00
parent ebfc207d3e
commit 2549e4f4c1
6 changed files with 25 additions and 13 deletions

View File

@ -12,7 +12,16 @@
Release History
===========================================================================
4.5 to 4.6: (January 1, 2015)
4.5 to 4.6: (February xx, 2015)
* Reverted some minor C++11 features (std::regex and cbegin/cend
iterators) in a few places, since otherwise GCC 4.9 is required to
compile Stella, and it isn't available on many systems yet. These
changes allow Stella to be built with GCC 4.8, which is present in
the latest 'long term release' of Ubuntu.
* Fixed error messages on state loading; sometimes multiple messages
were being added together and displayed.
* Fixed bug when running ROMs using AtariVox controllers; the app would
crash upon exiting the ROM.

View File

@ -31,7 +31,7 @@ class Cheat
public:
Cheat(OSystem& osystem, const string& name, const string& code)
: myOSystem(osystem),
myName(name == "" ? code : regex_replace(name, regex(":|\""), "")),
myName(name == "" ? code : name),
myCode(code),
myEnabled(false)
{ }

View File

@ -256,8 +256,8 @@ bool CartDebug::disassemble(bool force)
// Distella expects the addresses to be unique and in sorted order
if(bankChanged || !pcfound)
{
AddressList::const_iterator i;
for(i = addresses.cbegin(); i != addresses.cend(); ++i)
AddressList::iterator i; // TODO - change to C++11 const when available
for(i = addresses.begin(); i != addresses.end(); ++i)
{
if(PC < *i)
{

View File

@ -366,7 +366,7 @@ bool M6502::load(Serializer& in)
}
catch(...)
{
cerr << "ERROR: M6502::laod" << endl;
cerr << "ERROR: M6502::load" << endl;
return false;
}

View File

@ -190,13 +190,18 @@ void StateManager::loadState(int slot)
buf << "Incompatible state " << slot << " file";
else if(in.getString() != myOSystem.console().cartridge().name())
buf << "State " << slot << " file doesn't match current ROM";
else
{
if(myOSystem.console().load(in))
buf << "State " << slot << " loaded";
else
buf << "Invalid data in state " << slot << " file";
}
}
catch(...) { /* fall through to logic below */ }
if(myOSystem.console().load(in))
buf << "State " << slot << " loaded";
else
catch(...)
{
buf << "Invalid data in state " << slot << " file";
}
myOSystem.frameBuffer().showMessage(buf.str());
}

View File

@ -59,9 +59,7 @@ class InputTextDialog : public Dialog, public CommandSender
void handleCommand(CommandSender* sender, int cmd, int data, int id);
private:
using InputWidget = vector<EditTextWidget*>;
InputWidget myInput;
vector<EditTextWidget*> myInput;
StaticTextWidget* myTitle;
bool myEnableCenter;