| 332 | } |
| 333 | |
| 334 | IOS_ERROR IOS_RegisterResourceManager(const char* devicePath, IOSMsgQueueId msgQueueId) |
| 335 | { |
| 336 | std::unique_lock _lock(sInternalMutex); |
| 337 | if (_IOS_FindResourceManager(devicePath)) |
| 338 | { |
| 339 | cemu_assert_suspicious(); |
| 340 | return IOS_ERROR_INVALID; // correct error code? |
| 341 | } |
| 342 | |
| 343 | // verify if queue is valid |
| 344 | IOSMessageQueue* msgQueue; |
| 345 | IOS_ERROR r = _IOS_GetMessageQueue(msgQueueId, msgQueue); |
| 346 | if (r != IOS_ERROR_OK) |
| 347 | return r; |
| 348 | |
| 349 | // create resource manager |
| 350 | IOSResourceManager* resourceMgr = _IOS_CreateNewResourceManager(devicePath, msgQueueId); |
| 351 | if (!resourceMgr) |
| 352 | return IOS_ERROR_MAXIMUM_REACHED; |
| 353 | |
| 354 | return IOS_ERROR_OK; |
| 355 | } |
| 356 | |
| 357 | void IOS_DestroyResourceManagerForQueueId(IOSMsgQueueId msgQueueId) |
| 358 | { |
no test coverage detected