mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-23 14:15:42 +00:00
Rename 'name' member of ActionDescription to 'customName'
* This is a deliberate break of compatibility since the field is now often empty, for non-markers. This means code will get a more explicit error when the name is being referenced, so it can be updated to fetch the name it needs as needed.
This commit is contained in:
@@ -297,6 +297,18 @@ If no capture is loaded or the EID doesn't correspond to a known event, ``None``
|
||||
)");
|
||||
virtual const ActionDescription *GetActionForEID(uint32_t eventId) = 0;
|
||||
|
||||
DOCUMENT(R"(Returns the formatted name of an event according to the current settings, whether
|
||||
that be a custom name or an auto-generated name with/without parameter names.
|
||||
|
||||
If no capture is loaded or the EID doesn't correspond to a known event, an empty string will be
|
||||
returned.
|
||||
|
||||
:param int eventId: The EID to look up.
|
||||
:return: The formatted name of the specified event, or ``None`` if no such EID exists.
|
||||
:rtype: str
|
||||
)");
|
||||
virtual rdcstr GetEventName(uint32_t eventId) = 0;
|
||||
|
||||
DOCUMENT(R"(Determines if a given EID is visible with the current filters applied to the event
|
||||
browser.
|
||||
|
||||
|
||||
@@ -215,9 +215,11 @@ void RGPInterop::EventSelected(RGPInteropEvent event)
|
||||
|
||||
const ActionDescription *action = m_Ctx.GetAction(eventId);
|
||||
|
||||
if(action && QString(action->name) != event.eventname)
|
||||
const SDFile &file = m_Ctx.GetStructuredFile();
|
||||
|
||||
if(action && QString(file.chunks[action->events.back().chunkIndex]->name) != event.eventname)
|
||||
qWarning() << "Action name mismatch. Expected " << event.eventname << " but got "
|
||||
<< QString(action->name);
|
||||
<< QString(file.chunks[action->events.back().chunkIndex]->name);
|
||||
|
||||
m_Ctx.SetEventID({}, eventId, eventId);
|
||||
|
||||
@@ -265,10 +267,7 @@ 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();
|
||||
if(ev.eventId == action.eventId)
|
||||
m_Event2RGP[ev.eventId].eventname = action.name;
|
||||
else
|
||||
m_Event2RGP[ev.eventId].eventname = chunk->name;
|
||||
m_Event2RGP[ev.eventId].eventname = chunk->name;
|
||||
|
||||
m_RGP2Event.push_back(ev.eventId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user