diff options
| author | 2019-11-26 14:10:49 -0500 | |
|---|---|---|
| committer | 2019-11-26 21:55:37 -0500 | |
| commit | 536fc7f0ea77e08d68c760f387c307d258804e3b (patch) | |
| tree | e979df531bf1222788cc26144531c6e6f5cca1d1 /src/core/reporter.cpp | |
| parent | core/memory: Move memory read/write implementation functions into an anonymou... (diff) | |
| download | yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.tar.gz yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.tar.xz yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.zip | |
core: Prepare various classes for memory read/write migration
Amends a few interfaces to be able to handle the migration over to the
new Memory class by passing the class by reference as a function
parameter where necessary.
Notably, within the filesystem services, this eliminates two ReadBlock()
calls by using the helper functions of HLERequestContext to do that for
us.
Diffstat (limited to 'src/core/reporter.cpp')
| -rw-r--r-- | src/core/reporter.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp index 6f4af77fd..af0988d62 100644 --- a/src/core/reporter.cpp +++ b/src/core/reporter.cpp | |||
| @@ -147,7 +147,7 @@ json GetFullDataAuto(const std::string& timestamp, u64 title_id, Core::System& s | |||
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | template <bool read_value, typename DescriptorType> | 149 | template <bool read_value, typename DescriptorType> |
| 150 | json GetHLEBufferDescriptorData(const std::vector<DescriptorType>& buffer) { | 150 | json GetHLEBufferDescriptorData(const std::vector<DescriptorType>& buffer, Memory::Memory& memory) { |
| 151 | auto buffer_out = json::array(); | 151 | auto buffer_out = json::array(); |
| 152 | for (const auto& desc : buffer) { | 152 | for (const auto& desc : buffer) { |
| 153 | auto entry = json{ | 153 | auto entry = json{ |
| @@ -167,7 +167,7 @@ json GetHLEBufferDescriptorData(const std::vector<DescriptorType>& buffer) { | |||
| 167 | return buffer_out; | 167 | return buffer_out; |
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | json GetHLERequestContextData(Kernel::HLERequestContext& ctx) { | 170 | json GetHLERequestContextData(Kernel::HLERequestContext& ctx, Memory::Memory& memory) { |
| 171 | json out; | 171 | json out; |
| 172 | 172 | ||
| 173 | auto cmd_buf = json::array(); | 173 | auto cmd_buf = json::array(); |
| @@ -177,10 +177,10 @@ json GetHLERequestContextData(Kernel::HLERequestContext& ctx) { | |||
| 177 | 177 | ||
| 178 | out["command_buffer"] = std::move(cmd_buf); | 178 | out["command_buffer"] = std::move(cmd_buf); |
| 179 | 179 | ||
| 180 | out["buffer_descriptor_a"] = GetHLEBufferDescriptorData<true>(ctx.BufferDescriptorA()); | 180 | out["buffer_descriptor_a"] = GetHLEBufferDescriptorData<true>(ctx.BufferDescriptorA(), memory); |
| 181 | out["buffer_descriptor_b"] = GetHLEBufferDescriptorData<false>(ctx.BufferDescriptorB()); | 181 | out["buffer_descriptor_b"] = GetHLEBufferDescriptorData<false>(ctx.BufferDescriptorB(), memory); |
| 182 | out["buffer_descriptor_c"] = GetHLEBufferDescriptorData<false>(ctx.BufferDescriptorC()); | 182 | out["buffer_descriptor_c"] = GetHLEBufferDescriptorData<false>(ctx.BufferDescriptorC(), memory); |
| 183 | out["buffer_descriptor_x"] = GetHLEBufferDescriptorData<true>(ctx.BufferDescriptorX()); | 183 | out["buffer_descriptor_x"] = GetHLEBufferDescriptorData<true>(ctx.BufferDescriptorX(), memory); |
| 184 | 184 | ||
| 185 | return out; | 185 | return out; |
| 186 | } | 186 | } |
| @@ -259,7 +259,7 @@ void Reporter::SaveUnimplementedFunctionReport(Kernel::HLERequestContext& ctx, u | |||
| 259 | const auto title_id = system.CurrentProcess()->GetTitleID(); | 259 | const auto title_id = system.CurrentProcess()->GetTitleID(); |
| 260 | auto out = GetFullDataAuto(timestamp, title_id, system); | 260 | auto out = GetFullDataAuto(timestamp, title_id, system); |
| 261 | 261 | ||
| 262 | auto function_out = GetHLERequestContextData(ctx); | 262 | auto function_out = GetHLERequestContextData(ctx, system.Memory()); |
| 263 | function_out["command_id"] = command_id; | 263 | function_out["command_id"] = command_id; |
| 264 | function_out["function_name"] = name; | 264 | function_out["function_name"] = name; |
| 265 | function_out["service_name"] = service_name; | 265 | function_out["service_name"] = service_name; |