mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	svc: added some assertions
This commit is contained in:
		
							parent
							
								
									16fea415d0
								
							
						
					
					
						commit
						6e51c56fe4
					
				
					 1 changed files with 4 additions and 6 deletions
				
			
		|  | @ -84,19 +84,17 @@ Result MapMemoryBlock(Handle memblock, u32 addr, u32 mypermissions, u32 otherper | ||||||
| /// Connect to an OS service given the port name, returns the handle to the port to out
 | /// Connect to an OS service given the port name, returns the handle to the port to out
 | ||||||
| Result ConnectToPort(void* out, const char* port_name) { | Result ConnectToPort(void* out, const char* port_name) { | ||||||
|     Service::Interface* service = Service::g_manager->FetchFromPortName(port_name); |     Service::Interface* service = Service::g_manager->FetchFromPortName(port_name); | ||||||
|     if (service) { |  | ||||||
|         Core::g_app_core->SetReg(1, service->GetHandle()); |  | ||||||
|     } else { |  | ||||||
|         PanicYesNo("ConnectToPort called port_name=%s, but it is not implemented!", port_name); |  | ||||||
|     } |  | ||||||
|     DEBUG_LOG(SVC, "ConnectToPort called port_name=%s", port_name); |     DEBUG_LOG(SVC, "ConnectToPort called port_name=%s", port_name); | ||||||
|  |     _assert_msg_(KERNEL, service, "ConnectToPort called, but service is not implemented!"); | ||||||
|  |     Core::g_app_core->SetReg(1, service->GetHandle()); | ||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /// Synchronize to an OS service
 | /// Synchronize to an OS service
 | ||||||
| Result SendSyncRequest(Handle handle) { | Result SendSyncRequest(Handle handle) { | ||||||
|     DEBUG_LOG(SVC, "SendSyncRequest called handle=0x%08X"); |  | ||||||
|     Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); |     Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); | ||||||
|  |     DEBUG_LOG(SVC, "SendSyncRequest called handle=0x%08X"); | ||||||
|  |     _assert_msg_(KERNEL, object, "SendSyncRequest called, but kernel object is NULL!"); | ||||||
|     object->SyncRequest(); |     object->SyncRequest(); | ||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue