Merge branch 'master' into feature/sdl3-conversion

This commit is contained in:
Stephen Anthony 2025-05-22 12:56:54 -02:30
commit 6bd7dedeef
3 changed files with 50 additions and 0 deletions

View File

@ -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()
{
@ -768,6 +811,8 @@ string DebuggerParser::saveScriptFile(string file)
out << '\n';
}
out << getTimerCmds();
// Append 'script' extension when necessary
if(file.find_last_of('.') == string::npos)
file += ".script";

View File

@ -146,6 +146,7 @@ class DebuggerParser
void printTimer(uInt32 idx,bool showHeader = true);
void listTimers();
string getTimerCmds();
// output the error with the example provided for the command
void outputCommandError(string_view errorMsg, int command);

View File

@ -339,6 +339,10 @@ void Dialog::render()
//cerr << " render " << typeid(*this).name() << '\n';
#endif
if(_surface == NULL) {
return; // fixes #1078
}
// Update dialog surface; also render any extra surfaces
// Extra surfaces must be rendered afterwards, so they are drawn on top
if(_surface->render())