diff options
| author | 2014-05-26 21:57:10 -0400 | |
|---|---|---|
| committer | 2014-05-26 21:57:10 -0400 | |
| commit | 6e51c56fe41c3ff38db3a13e8773a9e9b2103377 (patch) | |
| tree | 080a62d3b66b07d4544ffbffc70ec9915e69dde7 /src/core | |
| parent | service: Renamed Sync to SyncRequest (diff) | |
| download | yuzu-6e51c56fe41c3ff38db3a13e8773a9e9b2103377.tar.gz yuzu-6e51c56fe41c3ff38db3a13e8773a9e9b2103377.tar.xz yuzu-6e51c56fe41c3ff38db3a13e8773a9e9b2103377.zip | |
svc: added some assertions
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/svc.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index ac016a966..6f72a6eb7 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp | |||
| @@ -84,19 +84,17 @@ Result MapMemoryBlock(Handle memblock, u32 addr, u32 mypermissions, u32 otherper | |||
| 84 | /// Connect to an OS service given the port name, returns the handle to the port to out | 84 | /// Connect to an OS service given the port name, returns the handle to the port to out |
| 85 | Result ConnectToPort(void* out, const char* port_name) { | 85 | Result ConnectToPort(void* out, const char* port_name) { |
| 86 | Service::Interface* service = Service::g_manager->FetchFromPortName(port_name); | 86 | Service::Interface* service = Service::g_manager->FetchFromPortName(port_name); |
| 87 | if (service) { | ||
| 88 | Core::g_app_core->SetReg(1, service->GetHandle()); | ||
| 89 | } else { | ||
| 90 | PanicYesNo("ConnectToPort called port_name=%s, but it is not implemented!", port_name); | ||
| 91 | } | ||
| 92 | DEBUG_LOG(SVC, "ConnectToPort called port_name=%s", port_name); | 87 | DEBUG_LOG(SVC, "ConnectToPort called port_name=%s", port_name); |
| 88 | _assert_msg_(KERNEL, service, "ConnectToPort called, but service is not implemented!"); | ||
| 89 | Core::g_app_core->SetReg(1, service->GetHandle()); | ||
| 93 | return 0; | 90 | return 0; |
| 94 | } | 91 | } |
| 95 | 92 | ||
| 96 | /// Synchronize to an OS service | 93 | /// Synchronize to an OS service |
| 97 | Result SendSyncRequest(Handle handle) { | 94 | Result SendSyncRequest(Handle handle) { |
| 98 | DEBUG_LOG(SVC, "SendSyncRequest called handle=0x%08X"); | ||
| 99 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); | 95 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); |
| 96 | DEBUG_LOG(SVC, "SendSyncRequest called handle=0x%08X"); | ||
| 97 | _assert_msg_(KERNEL, object, "SendSyncRequest called, but kernel object is NULL!"); | ||
| 100 | object->SyncRequest(); | 98 | object->SyncRequest(); |
| 101 | return 0; | 99 | return 0; |
| 102 | } | 100 | } |