mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-23 06:05:45 +00:00
Change API enums to enum class, remove now redundant prefixing
* This gives a little nicer syntax, a bit better type safety, and also reflects better for SWIG bindings. Overall it's a minor change but better. * We don't update the C# UI at all, since it's soon to be removed and not worth the effort/code churn. * For now so we're ABI compatible with C#, all enums are uint32_t, but that is an obvious optimisation in future to reduce struct packing. * We avoid 'None' as an enum value, because it's a reserved word in python so will cause problems generating bindings.
This commit is contained in:
@@ -994,7 +994,7 @@ void LiveCapture::connectionThreadEntry()
|
||||
TargetControlMessage msg;
|
||||
m_Connection->ReceiveMessage(&msg);
|
||||
|
||||
if(msg.Type == eTargetControlMsg_RegisterAPI)
|
||||
if(msg.Type == TargetControlMessageType::RegisterAPI)
|
||||
{
|
||||
QString api = ToQStr(msg.RegisterAPI.APIName);
|
||||
GUIInvoke::call([this, api]() {
|
||||
@@ -1016,7 +1016,7 @@ void LiveCapture::connectionThreadEntry()
|
||||
});
|
||||
}
|
||||
|
||||
if(msg.Type == eTargetControlMsg_NewCapture)
|
||||
if(msg.Type == TargetControlMessageType::NewCapture)
|
||||
{
|
||||
uint32_t capID = msg.NewCapture.ID;
|
||||
QDateTime timestamp = QDateTime(QDate(1970, 1, 1), QTime(0, 0, 0));
|
||||
@@ -1033,7 +1033,7 @@ void LiveCapture::connectionThreadEntry()
|
||||
});
|
||||
}
|
||||
|
||||
if(msg.Type == eTargetControlMsg_CaptureCopied)
|
||||
if(msg.Type == TargetControlMessageType::CaptureCopied)
|
||||
{
|
||||
uint32_t capID = msg.NewCapture.ID;
|
||||
QString path = ToQStr(msg.NewCapture.path);
|
||||
@@ -1041,7 +1041,7 @@ void LiveCapture::connectionThreadEntry()
|
||||
GUIInvoke::call([=]() { captureCopied(capID, path); });
|
||||
}
|
||||
|
||||
if(msg.Type == eTargetControlMsg_NewChild)
|
||||
if(msg.Type == TargetControlMessageType::NewChild)
|
||||
{
|
||||
if(msg.NewChild.PID != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user