summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/vi/vi.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/vi/vi.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp
index a1a7ac987..7ae07d072 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -15,6 +15,7 @@
#include "common/common_funcs.h"
#include "common/logging/log.h"
#include "common/math_util.h"
+#include "common/settings.h"
#include "common/swap.h"
#include "core/core_timing.h"
#include "core/hle/ipc_helpers.h"
@@ -30,7 +31,6 @@
#include "core/hle/service/vi/vi_m.h"
#include "core/hle/service/vi/vi_s.h"
#include "core/hle/service/vi/vi_u.h"
-#include "core/settings.h"
namespace Service::VI {
@@ -1129,9 +1129,11 @@ private:
}
NativeWindow native_window{*buffer_queue_id};
+ const auto buffer_size = ctx.WriteBuffer(native_window.Serialize());
+
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(RESULT_SUCCESS);
- rb.Push<u64>(ctx.WriteBuffer(native_window.Serialize()));
+ rb.Push<u64>(buffer_size);
}
void CloseLayer(Kernel::HLERequestContext& ctx) {
@@ -1173,10 +1175,12 @@ private:
}
NativeWindow native_window{*buffer_queue_id};
+ const auto buffer_size = ctx.WriteBuffer(native_window.Serialize());
+
IPC::ResponseBuilder rb{ctx, 6};
rb.Push(RESULT_SUCCESS);
rb.Push(*layer_id);
- rb.Push<u64>(ctx.WriteBuffer(native_window.Serialize()));
+ rb.Push<u64>(buffer_size);
}
void DestroyStrayLayer(Kernel::HLERequestContext& ctx) {