Try to produce old action names for RGP

* This may not work forever but remains compatible for now.
This commit is contained in:
baldurk
2021-07-09 19:02:49 +01:00
parent 4b52bc6a89
commit 7c7e9df847
+19 -1
View File
@@ -267,7 +267,25 @@ void RGPInterop::CreateMapping(const rdcarray<ActionDescription> &actions)
if(m_EventNames.contains(chunk->name, Qt::CaseSensitive))
{
m_Event2RGP[ev.eventId].interoplinearid = (uint32_t)m_RGP2Event.size();
m_Event2RGP[ev.eventId].eventname = chunk->name;
rdcstr n = chunk->name;
if(n.contains(':'))
n.erase(0, n.find_last_of(":") + 1);
n += "(";
bool first = true;
for(size_t i = 0; i < chunk->NumChildren(); i++)
{
const SDObject *o = chunk->GetChild(i);
if(o->type.flags & SDTypeFlags::Important)
{
if(first)
n += ", ";
first = false;
n += ToStr(o->AsUInt32());
}
}
n += ")";
m_Event2RGP[ev.eventId].eventname = n;
m_RGP2Event.push_back(ev.eventId);
}