diff options
| author | 2018-11-26 17:06:13 +1100 | |
|---|---|---|
| committer | 2018-11-26 17:06:13 +1100 | |
| commit | a2cc3b10bb6115b17d980fdb83ed5c561835eb3b (patch) | |
| tree | e802627fe23c3ad043c86bcf757d15d902127766 /src/core/hle/service/nim | |
| parent | Merge pull request #1800 from encounter/svcgetinfo (diff) | |
| download | yuzu-a2cc3b10bb6115b17d980fdb83ed5c561835eb3b.tar.gz yuzu-a2cc3b10bb6115b17d980fdb83ed5c561835eb3b.tar.xz yuzu-a2cc3b10bb6115b17d980fdb83ed5c561835eb3b.zip | |
Changed logging to be "Log before execution", Added more error logging, all services should now log on some level
Diffstat (limited to 'src/core/hle/service/nim')
| -rw-r--r-- | src/core/hle/service/nim/nim.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/core/hle/service/nim/nim.cpp b/src/core/hle/service/nim/nim.cpp index 18091c9bb..1bbccd444 100644 --- a/src/core/hle/service/nim/nim.cpp +++ b/src/core/hle/service/nim/nim.cpp | |||
| @@ -148,47 +148,53 @@ private: | |||
| 148 | 148 | ||
| 149 | void StartTask(Kernel::HLERequestContext& ctx) { | 149 | void StartTask(Kernel::HLERequestContext& ctx) { |
| 150 | // No need to connect to the internet, just finish the task straight away. | 150 | // No need to connect to the internet, just finish the task straight away. |
| 151 | LOG_DEBUG(Service_NIM, "called"); | ||
| 152 | |||
| 151 | finished_event->Signal(); | 153 | finished_event->Signal(); |
| 152 | IPC::ResponseBuilder rb{ctx, 2}; | 154 | IPC::ResponseBuilder rb{ctx, 2}; |
| 153 | rb.Push(RESULT_SUCCESS); | 155 | rb.Push(RESULT_SUCCESS); |
| 154 | LOG_DEBUG(Service_NIM, "called"); | ||
| 155 | } | 156 | } |
| 156 | 157 | ||
| 157 | void GetFinishNotificationEvent(Kernel::HLERequestContext& ctx) { | 158 | void GetFinishNotificationEvent(Kernel::HLERequestContext& ctx) { |
| 159 | LOG_DEBUG(Service_NIM, "called"); | ||
| 160 | |||
| 158 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 161 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| 159 | rb.Push(RESULT_SUCCESS); | 162 | rb.Push(RESULT_SUCCESS); |
| 160 | rb.PushCopyObjects(finished_event); | 163 | rb.PushCopyObjects(finished_event); |
| 161 | LOG_DEBUG(Service_NIM, "called"); | ||
| 162 | } | 164 | } |
| 163 | 165 | ||
| 164 | void GetResult(Kernel::HLERequestContext& ctx) { | 166 | void GetResult(Kernel::HLERequestContext& ctx) { |
| 167 | LOG_DEBUG(Service_NIM, "called"); | ||
| 168 | |||
| 165 | IPC::ResponseBuilder rb{ctx, 2}; | 169 | IPC::ResponseBuilder rb{ctx, 2}; |
| 166 | rb.Push(RESULT_SUCCESS); | 170 | rb.Push(RESULT_SUCCESS); |
| 167 | LOG_DEBUG(Service_NIM, "called"); | ||
| 168 | } | 171 | } |
| 169 | 172 | ||
| 170 | void Cancel(Kernel::HLERequestContext& ctx) { | 173 | void Cancel(Kernel::HLERequestContext& ctx) { |
| 174 | LOG_DEBUG(Service_NIM, "called"); | ||
| 175 | |||
| 171 | finished_event->Clear(); | 176 | finished_event->Clear(); |
| 172 | IPC::ResponseBuilder rb{ctx, 2}; | 177 | IPC::ResponseBuilder rb{ctx, 2}; |
| 173 | rb.Push(RESULT_SUCCESS); | 178 | rb.Push(RESULT_SUCCESS); |
| 174 | LOG_DEBUG(Service_NIM, "called"); | ||
| 175 | } | 179 | } |
| 176 | 180 | ||
| 177 | void IsProcessing(Kernel::HLERequestContext& ctx) { | 181 | void IsProcessing(Kernel::HLERequestContext& ctx) { |
| 182 | LOG_DEBUG(Service_NIM, "called"); | ||
| 183 | |||
| 178 | IPC::ResponseBuilder rb{ctx, 3}; | 184 | IPC::ResponseBuilder rb{ctx, 3}; |
| 179 | rb.Push(RESULT_SUCCESS); | 185 | rb.Push(RESULT_SUCCESS); |
| 180 | rb.PushRaw<u32>(0); // We instantly process the request | 186 | rb.PushRaw<u32>(0); // We instantly process the request |
| 181 | LOG_DEBUG(Service_NIM, "called"); | ||
| 182 | } | 187 | } |
| 183 | 188 | ||
| 184 | void GetServerTime(Kernel::HLERequestContext& ctx) { | 189 | void GetServerTime(Kernel::HLERequestContext& ctx) { |
| 190 | LOG_DEBUG(Service_NIM, "called"); | ||
| 191 | |||
| 185 | const s64 server_time{std::chrono::duration_cast<std::chrono::seconds>( | 192 | const s64 server_time{std::chrono::duration_cast<std::chrono::seconds>( |
| 186 | std::chrono::system_clock::now().time_since_epoch()) | 193 | std::chrono::system_clock::now().time_since_epoch()) |
| 187 | .count()}; | 194 | .count()}; |
| 188 | IPC::ResponseBuilder rb{ctx, 4}; | 195 | IPC::ResponseBuilder rb{ctx, 4}; |
| 189 | rb.Push(RESULT_SUCCESS); | 196 | rb.Push(RESULT_SUCCESS); |
| 190 | rb.PushRaw<s64>(server_time); | 197 | rb.PushRaw<s64>(server_time); |
| 191 | LOG_DEBUG(Service_NIM, "called"); | ||
| 192 | } | 198 | } |
| 193 | }; | 199 | }; |
| 194 | 200 | ||
| @@ -208,23 +214,26 @@ public: | |||
| 208 | 214 | ||
| 209 | private: | 215 | private: |
| 210 | void OpenEnsureNetworkClockAvailabilityService(Kernel::HLERequestContext& ctx) { | 216 | void OpenEnsureNetworkClockAvailabilityService(Kernel::HLERequestContext& ctx) { |
| 217 | LOG_DEBUG(Service_NIM, "called"); | ||
| 218 | |||
| 211 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 219 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 212 | rb.Push(RESULT_SUCCESS); | 220 | rb.Push(RESULT_SUCCESS); |
| 213 | rb.PushIpcInterface<IEnsureNetworkClockAvailabilityService>(); | 221 | rb.PushIpcInterface<IEnsureNetworkClockAvailabilityService>(); |
| 214 | LOG_DEBUG(Service_NIM, "called"); | ||
| 215 | } | 222 | } |
| 216 | 223 | ||
| 217 | // TODO(ogniK): Do we need these? | 224 | // TODO(ogniK): Do we need these? |
| 218 | void SuspendAutonomicTimeCorrection(Kernel::HLERequestContext& ctx) { | 225 | void SuspendAutonomicTimeCorrection(Kernel::HLERequestContext& ctx) { |
| 226 | LOG_WARNING(Service_NIM, "(STUBBED) called"); | ||
| 227 | |||
| 219 | IPC::ResponseBuilder rb{ctx, 2}; | 228 | IPC::ResponseBuilder rb{ctx, 2}; |
| 220 | rb.Push(RESULT_SUCCESS); | 229 | rb.Push(RESULT_SUCCESS); |
| 221 | LOG_WARNING(Service_NIM, "(STUBBED) called"); | ||
| 222 | } | 230 | } |
| 223 | 231 | ||
| 224 | void ResumeAutonomicTimeCorrection(Kernel::HLERequestContext& ctx) { | 232 | void ResumeAutonomicTimeCorrection(Kernel::HLERequestContext& ctx) { |
| 233 | LOG_WARNING(Service_NIM, "(STUBBED) called"); | ||
| 234 | |||
| 225 | IPC::ResponseBuilder rb{ctx, 2}; | 235 | IPC::ResponseBuilder rb{ctx, 2}; |
| 226 | rb.Push(RESULT_SUCCESS); | 236 | rb.Push(RESULT_SUCCESS); |
| 227 | LOG_WARNING(Service_NIM, "(STUBBED) called"); | ||
| 228 | } | 237 | } |
| 229 | }; | 238 | }; |
| 230 | 239 | ||