mirror of https://github.com/stella-emu/stella.git
Merge branch 'master' into feature/sdl3-conversion
This commit is contained in:
commit
6bd7dedeef
|
@ -653,6 +653,49 @@ void DebuggerParser::printTimer(uInt32 idx, bool showHeader)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
string DebuggerParser::getTimerCmds()
|
||||||
|
{
|
||||||
|
ostringstream out;
|
||||||
|
|
||||||
|
for(uInt32 idx = 0; idx < debugger.m6502().numTimers(); ++idx)
|
||||||
|
{
|
||||||
|
const TimerMap::Timer& timer = debugger.m6502().getTimer(idx);
|
||||||
|
const bool banked = debugger.cartDebug().romBankCount() > 1;
|
||||||
|
ostringstream fromBuf;
|
||||||
|
|
||||||
|
if(!debugger.cartDebug().getLabel(fromBuf, timer.from.addr, true))
|
||||||
|
fromBuf << Base::HEX4 << timer.from.addr;
|
||||||
|
fromBuf << (timer.mirrors ? "+" : "");
|
||||||
|
|
||||||
|
out << "timer " << fromBuf.str();
|
||||||
|
|
||||||
|
if(banked) {
|
||||||
|
if(timer.anyBank)
|
||||||
|
fromBuf << "*";
|
||||||
|
else
|
||||||
|
fromBuf << dec << static_cast<uInt16>(timer.from.bank);
|
||||||
|
}
|
||||||
|
if(!timer.isPartial) {
|
||||||
|
ostringstream toBuf;
|
||||||
|
|
||||||
|
if(!debugger.cartDebug().getLabel(toBuf, timer.to.addr, true))
|
||||||
|
toBuf << Base::HEX4 << timer.to.addr;
|
||||||
|
toBuf << (timer.mirrors ? "+" : "");
|
||||||
|
|
||||||
|
if(banked) {
|
||||||
|
if(timer.anyBank)
|
||||||
|
toBuf << "*";
|
||||||
|
else
|
||||||
|
toBuf << dec << static_cast<uInt16>(timer.to.bank);
|
||||||
|
}
|
||||||
|
out << " " << toBuf.str();
|
||||||
|
}
|
||||||
|
out << "\n";
|
||||||
|
} // for
|
||||||
|
return out.str();
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void DebuggerParser::listTimers()
|
void DebuggerParser::listTimers()
|
||||||
{
|
{
|
||||||
|
@ -768,6 +811,8 @@ string DebuggerParser::saveScriptFile(string file)
|
||||||
out << '\n';
|
out << '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out << getTimerCmds();
|
||||||
|
|
||||||
// Append 'script' extension when necessary
|
// Append 'script' extension when necessary
|
||||||
if(file.find_last_of('.') == string::npos)
|
if(file.find_last_of('.') == string::npos)
|
||||||
file += ".script";
|
file += ".script";
|
||||||
|
|
|
@ -146,6 +146,7 @@ class DebuggerParser
|
||||||
|
|
||||||
void printTimer(uInt32 idx,bool showHeader = true);
|
void printTimer(uInt32 idx,bool showHeader = true);
|
||||||
void listTimers();
|
void listTimers();
|
||||||
|
string getTimerCmds();
|
||||||
|
|
||||||
// output the error with the example provided for the command
|
// output the error with the example provided for the command
|
||||||
void outputCommandError(string_view errorMsg, int command);
|
void outputCommandError(string_view errorMsg, int command);
|
||||||
|
|
|
@ -339,6 +339,10 @@ void Dialog::render()
|
||||||
//cerr << " render " << typeid(*this).name() << '\n';
|
//cerr << " render " << typeid(*this).name() << '\n';
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if(_surface == NULL) {
|
||||||
|
return; // fixes #1078
|
||||||
|
}
|
||||||
|
|
||||||
// Update dialog surface; also render any extra surfaces
|
// Update dialog surface; also render any extra surfaces
|
||||||
// Extra surfaces must be rendered afterwards, so they are drawn on top
|
// Extra surfaces must be rendered afterwards, so they are drawn on top
|
||||||
if(_surface->render())
|
if(_surface->render())
|
||||||
|
|
Loading…
Reference in New Issue