diff options
| author | 2021-04-19 12:45:26 -0400 | |
|---|---|---|
| committer | 2021-04-19 12:45:50 -0400 | |
| commit | 27eeb20001777227a3e275a4f2be75ac081622e8 (patch) | |
| tree | ac2b1b0976bef32c400616ef80694845d1c3a0d7 /src | |
| parent | Merge pull request #6208 from lat9nq/boost-static (diff) | |
| download | yuzu-27eeb20001777227a3e275a4f2be75ac081622e8.tar.gz yuzu-27eeb20001777227a3e275a4f2be75ac081622e8.tar.xz yuzu-27eeb20001777227a3e275a4f2be75ac081622e8.zip | |
general: Write buffers before pushing raw arguments
For consistency with the rest of the service implementations
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/set/set.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/time/time_zone_service.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/vi/vi.cpp | 8 |
3 files changed, 12 insertions, 5 deletions
diff --git a/src/core/hle/service/set/set.cpp b/src/core/hle/service/set/set.cpp index bc7dc776f..fbdc4793d 100644 --- a/src/core/hle/service/set/set.cpp +++ b/src/core/hle/service/set/set.cpp | |||
| @@ -104,9 +104,10 @@ void GetKeyCodeMapImpl(Kernel::HLERequestContext& ctx) { | |||
| 104 | layout = key_code->second; | 104 | layout = key_code->second; |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | ctx.WriteBuffer(layout); | ||
| 108 | |||
| 107 | IPC::ResponseBuilder rb{ctx, 2}; | 109 | IPC::ResponseBuilder rb{ctx, 2}; |
| 108 | rb.Push(RESULT_SUCCESS); | 110 | rb.Push(RESULT_SUCCESS); |
| 109 | ctx.WriteBuffer(layout); | ||
| 110 | } | 111 | } |
| 111 | } // Anonymous namespace | 112 | } // Anonymous namespace |
| 112 | 113 | ||
diff --git a/src/core/hle/service/time/time_zone_service.cpp b/src/core/hle/service/time/time_zone_service.cpp index 3117627cf..19d7a1a0c 100644 --- a/src/core/hle/service/time/time_zone_service.cpp +++ b/src/core/hle/service/time/time_zone_service.cpp | |||
| @@ -140,11 +140,12 @@ void ITimeZoneService::ToPosixTime(Kernel::HLERequestContext& ctx) { | |||
| 140 | return; | 140 | return; |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | ctx.WriteBuffer(posix_time); | ||
| 144 | |||
| 143 | // TODO(bunnei): Handle multiple times | 145 | // TODO(bunnei): Handle multiple times |
| 144 | IPC::ResponseBuilder rb{ctx, 3}; | 146 | IPC::ResponseBuilder rb{ctx, 3}; |
| 145 | rb.Push(RESULT_SUCCESS); | 147 | rb.Push(RESULT_SUCCESS); |
| 146 | rb.PushRaw<u32>(1); // Number of times we're returning | 148 | rb.PushRaw<u32>(1); // Number of times we're returning |
| 147 | ctx.WriteBuffer(posix_time); | ||
| 148 | } | 149 | } |
| 149 | 150 | ||
| 150 | void ITimeZoneService::ToPosixTimeWithMyRule(Kernel::HLERequestContext& ctx) { | 151 | void ITimeZoneService::ToPosixTimeWithMyRule(Kernel::HLERequestContext& ctx) { |
| @@ -163,10 +164,11 @@ void ITimeZoneService::ToPosixTimeWithMyRule(Kernel::HLERequestContext& ctx) { | |||
| 163 | return; | 164 | return; |
| 164 | } | 165 | } |
| 165 | 166 | ||
| 167 | ctx.WriteBuffer(posix_time); | ||
| 168 | |||
| 166 | IPC::ResponseBuilder rb{ctx, 3}; | 169 | IPC::ResponseBuilder rb{ctx, 3}; |
| 167 | rb.Push(RESULT_SUCCESS); | 170 | rb.Push(RESULT_SUCCESS); |
| 168 | rb.PushRaw<u32>(1); // Number of times we're returning | 171 | rb.PushRaw<u32>(1); // Number of times we're returning |
| 169 | ctx.WriteBuffer(posix_time); | ||
| 170 | } | 172 | } |
| 171 | 173 | ||
| 172 | } // namespace Service::Time | 174 | } // namespace Service::Time |
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 348360b51..7ae07d072 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp | |||
| @@ -1129,9 +1129,11 @@ private: | |||
| 1129 | } | 1129 | } |
| 1130 | 1130 | ||
| 1131 | NativeWindow native_window{*buffer_queue_id}; | 1131 | NativeWindow native_window{*buffer_queue_id}; |
| 1132 | const auto buffer_size = ctx.WriteBuffer(native_window.Serialize()); | ||
| 1133 | |||
| 1132 | IPC::ResponseBuilder rb{ctx, 4}; | 1134 | IPC::ResponseBuilder rb{ctx, 4}; |
| 1133 | rb.Push(RESULT_SUCCESS); | 1135 | rb.Push(RESULT_SUCCESS); |
| 1134 | rb.Push<u64>(ctx.WriteBuffer(native_window.Serialize())); | 1136 | rb.Push<u64>(buffer_size); |
| 1135 | } | 1137 | } |
| 1136 | 1138 | ||
| 1137 | void CloseLayer(Kernel::HLERequestContext& ctx) { | 1139 | void CloseLayer(Kernel::HLERequestContext& ctx) { |
| @@ -1173,10 +1175,12 @@ private: | |||
| 1173 | } | 1175 | } |
| 1174 | 1176 | ||
| 1175 | NativeWindow native_window{*buffer_queue_id}; | 1177 | NativeWindow native_window{*buffer_queue_id}; |
| 1178 | const auto buffer_size = ctx.WriteBuffer(native_window.Serialize()); | ||
| 1179 | |||
| 1176 | IPC::ResponseBuilder rb{ctx, 6}; | 1180 | IPC::ResponseBuilder rb{ctx, 6}; |
| 1177 | rb.Push(RESULT_SUCCESS); | 1181 | rb.Push(RESULT_SUCCESS); |
| 1178 | rb.Push(*layer_id); | 1182 | rb.Push(*layer_id); |
| 1179 | rb.Push<u64>(ctx.WriteBuffer(native_window.Serialize())); | 1183 | rb.Push<u64>(buffer_size); |
| 1180 | } | 1184 | } |
| 1181 | 1185 | ||
| 1182 | void DestroyStrayLayer(Kernel::HLERequestContext& ctx) { | 1186 | void DestroyStrayLayer(Kernel::HLERequestContext& ctx) { |