mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-12-23 16:21:53 +01:00
IOSU: Clean up resource on service shutdown
Also set device-dependent thread name
This commit is contained in:
parent
b2be3c13df
commit
c038e758ae
@ -155,7 +155,9 @@ namespace iosu
|
||||
|
||||
void IPCService::ServiceThread()
|
||||
{
|
||||
SetThreadName("IPCService");
|
||||
std::string serviceName = m_devicePath.substr(m_devicePath.find_last_of('/') == std::string::npos ? 0 : m_devicePath.find_last_of('/') + 1);
|
||||
serviceName.insert(0, "NNsvc_");
|
||||
SetThreadName(serviceName.c_str());
|
||||
m_msgQueueId = IOS_CreateMessageQueue(_m_msgBuffer.GetPtr(), _m_msgBuffer.GetCount());
|
||||
cemu_assert(!IOS_ResultIsError((IOS_ERROR)m_msgQueueId));
|
||||
IOS_ERROR r = IOS_RegisterResourceManager(m_devicePath.c_str(), m_msgQueueId);
|
||||
@ -208,6 +210,7 @@ namespace iosu
|
||||
IOS_ResourceReply(cmd, IOS_ERROR_INVALID);
|
||||
}
|
||||
}
|
||||
IOS_DestroyMessageQueue(m_msgQueueId);
|
||||
m_threadInitialized = false;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user