diff options
| author | 2020-09-25 00:05:12 -0400 | |
|---|---|---|
| committer | 2020-09-25 00:06:40 -0400 | |
| commit | f3a1bf53f94336b2863baf14eecc714b510fee39 (patch) | |
| tree | d64e3536d75fb9c134549a3d3483386f0e2f4392 /src | |
| parent | Merge pull request #4698 from lioncash/optional-null (diff) | |
| download | yuzu-f3a1bf53f94336b2863baf14eecc714b510fee39.tar.gz yuzu-f3a1bf53f94336b2863baf14eecc714b510fee39.tar.xz yuzu-f3a1bf53f94336b2863baf14eecc714b510fee39.zip | |
service: Restore "unused" function
Turns out this function is actually used, but within a trace log.
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/service.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 76b3533ec..ba9159ee0 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -72,6 +72,23 @@ | |||
| 72 | 72 | ||
| 73 | namespace Service { | 73 | namespace Service { |
| 74 | 74 | ||
| 75 | /** | ||
| 76 | * Creates a function string for logging, complete with the name (or header code, depending | ||
| 77 | * on what's passed in) the port name, and all the cmd_buff arguments. | ||
| 78 | */ | ||
| 79 | [[maybe_unused]] static std::string MakeFunctionString(std::string_view name, | ||
| 80 | std::string_view port_name, | ||
| 81 | const u32* cmd_buff) { | ||
| 82 | // Number of params == bits 0-5 + bits 6-11 | ||
| 83 | int num_params = (cmd_buff[0] & 0x3F) + ((cmd_buff[0] >> 6) & 0x3F); | ||
| 84 | |||
| 85 | std::string function_string = fmt::format("function '{}': port={}", name, port_name); | ||
| 86 | for (int i = 1; i <= num_params; ++i) { | ||
| 87 | function_string += fmt::format(", cmd_buff[{}]=0x{:X}", i, cmd_buff[i]); | ||
| 88 | } | ||
| 89 | return function_string; | ||
| 90 | } | ||
| 91 | |||
| 75 | ServiceFrameworkBase::ServiceFrameworkBase(const char* service_name, u32 max_sessions, | 92 | ServiceFrameworkBase::ServiceFrameworkBase(const char* service_name, u32 max_sessions, |
| 76 | InvokerFn* handler_invoker) | 93 | InvokerFn* handler_invoker) |
| 77 | : service_name(service_name), max_sessions(max_sessions), handler_invoker(handler_invoker) {} | 94 | : service_name(service_name), max_sessions(max_sessions), handler_invoker(handler_invoker) {} |