diff --git a/Changes.txt b/Changes.txt index 533c53aa3..5185fba64 100644 --- a/Changes.txt +++ b/Changes.txt @@ -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. diff --git a/src/cheat/Cheat.hxx b/src/cheat/Cheat.hxx index 2f1d2d6e5..952909677 100644 --- a/src/cheat/Cheat.hxx +++ b/src/cheat/Cheat.hxx @@ -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) { } diff --git a/src/debugger/CartDebug.cxx b/src/debugger/CartDebug.cxx index e1fa5f7c3..63d5bd41a 100644 --- a/src/debugger/CartDebug.cxx +++ b/src/debugger/CartDebug.cxx @@ -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) { diff --git a/src/emucore/M6502.cxx b/src/emucore/M6502.cxx index 5afe2c4c8..2f1659f65 100644 --- a/src/emucore/M6502.cxx +++ b/src/emucore/M6502.cxx @@ -366,7 +366,7 @@ bool M6502::load(Serializer& in) } catch(...) { - cerr << "ERROR: M6502::laod" << endl; + cerr << "ERROR: M6502::load" << endl; return false; } diff --git a/src/emucore/StateManager.cxx b/src/emucore/StateManager.cxx index d3d6eb706..f2094b31c 100644 --- a/src/emucore/StateManager.cxx +++ b/src/emucore/StateManager.cxx @@ -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()); } diff --git a/src/gui/InputTextDialog.hxx b/src/gui/InputTextDialog.hxx index 45317b2fd..5e907b375 100644 --- a/src/gui/InputTextDialog.hxx +++ b/src/gui/InputTextDialog.hxx @@ -59,9 +59,7 @@ class InputTextDialog : public Dialog, public CommandSender void handleCommand(CommandSender* sender, int cmd, int data, int id); private: - using InputWidget = vector; - - InputWidget myInput; + vector myInput; StaticTextWidget* myTitle; bool myEnableCenter;