mirror of https://github.com/stella-emu/stella.git
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:
parent
ebfc207d3e
commit
2549e4f4c1
11
Changes.txt
11
Changes.txt
|
@ -12,7 +12,16 @@
|
||||||
Release History
|
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
|
* Fixed bug when running ROMs using AtariVox controllers; the app would
|
||||||
crash upon exiting the ROM.
|
crash upon exiting the ROM.
|
||||||
|
|
|
@ -31,7 +31,7 @@ class Cheat
|
||||||
public:
|
public:
|
||||||
Cheat(OSystem& osystem, const string& name, const string& code)
|
Cheat(OSystem& osystem, const string& name, const string& code)
|
||||||
: myOSystem(osystem),
|
: myOSystem(osystem),
|
||||||
myName(name == "" ? code : regex_replace(name, regex(":|\""), "")),
|
myName(name == "" ? code : name),
|
||||||
myCode(code),
|
myCode(code),
|
||||||
myEnabled(false)
|
myEnabled(false)
|
||||||
{ }
|
{ }
|
||||||
|
|
|
@ -256,8 +256,8 @@ bool CartDebug::disassemble(bool force)
|
||||||
// Distella expects the addresses to be unique and in sorted order
|
// Distella expects the addresses to be unique and in sorted order
|
||||||
if(bankChanged || !pcfound)
|
if(bankChanged || !pcfound)
|
||||||
{
|
{
|
||||||
AddressList::const_iterator i;
|
AddressList::iterator i; // TODO - change to C++11 const when available
|
||||||
for(i = addresses.cbegin(); i != addresses.cend(); ++i)
|
for(i = addresses.begin(); i != addresses.end(); ++i)
|
||||||
{
|
{
|
||||||
if(PC < *i)
|
if(PC < *i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -366,7 +366,7 @@ bool M6502::load(Serializer& in)
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{
|
{
|
||||||
cerr << "ERROR: M6502::laod" << endl;
|
cerr << "ERROR: M6502::load" << endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -190,13 +190,18 @@ void StateManager::loadState(int slot)
|
||||||
buf << "Incompatible state " << slot << " file";
|
buf << "Incompatible state " << slot << " file";
|
||||||
else if(in.getString() != myOSystem.console().cartridge().name())
|
else if(in.getString() != myOSystem.console().cartridge().name())
|
||||||
buf << "State " << slot << " file doesn't match current ROM";
|
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 */ }
|
catch(...)
|
||||||
|
{
|
||||||
if(myOSystem.console().load(in))
|
|
||||||
buf << "State " << slot << " loaded";
|
|
||||||
else
|
|
||||||
buf << "Invalid data in state " << slot << " file";
|
buf << "Invalid data in state " << slot << " file";
|
||||||
|
}
|
||||||
|
|
||||||
myOSystem.frameBuffer().showMessage(buf.str());
|
myOSystem.frameBuffer().showMessage(buf.str());
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,9 +59,7 @@ class InputTextDialog : public Dialog, public CommandSender
|
||||||
void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
using InputWidget = vector<EditTextWidget*>;
|
vector<EditTextWidget*> myInput;
|
||||||
|
|
||||||
InputWidget myInput;
|
|
||||||
StaticTextWidget* myTitle;
|
StaticTextWidget* myTitle;
|
||||||
|
|
||||||
bool myEnableCenter;
|
bool myEnableCenter;
|
||||||
|
|
Loading…
Reference in New Issue