summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/hle/service/y2r_u.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/core/hle/service/y2r_u.cpp b/src/core/hle/service/y2r_u.cpp
index a58e04d6d..6607965e1 100644
--- a/src/core/hle/service/y2r_u.cpp
+++ b/src/core/hle/service/y2r_u.cpp
@@ -11,6 +11,8 @@
11 11
12namespace Y2R_U { 12namespace Y2R_U {
13 13
14static Kernel::SharedPtr<Kernel::Event> completion_event = 0;
15
14/** 16/**
15 * Y2R_U::IsBusyConversion service function 17 * Y2R_U::IsBusyConversion service function
16 * Outputs: 18 * Outputs:
@@ -26,13 +28,26 @@ static void IsBusyConversion(Service::Interface* self) {
26 LOG_WARNING(Service, "(STUBBED) called"); 28 LOG_WARNING(Service, "(STUBBED) called");
27} 29}
28 30
31/**
32 * Y2R_U::GetTransferEndEvent service function
33 * Outputs:
34 * 1 : Result of function, 0 on success, otherwise error code
35 * 3 : The handle of the completion event
36 */
37static void GetTransferEndEvent(Service::Interface* self) {
38 u32* cmd_buff = Kernel::GetCommandBuffer();
39
40 cmd_buff[1] = RESULT_SUCCESS.raw;
41 cmd_buff[3] = Kernel::g_handle_table.Create(completion_event).MoveFrom();
42}
43
29const Interface::FunctionInfo FunctionTable[] = { 44const Interface::FunctionInfo FunctionTable[] = {
30 {0x00010040, nullptr, "SetInputFormat"}, 45 {0x00010040, nullptr, "SetInputFormat"},
31 {0x00030040, nullptr, "SetOutputFormat"}, 46 {0x00030040, nullptr, "SetOutputFormat"},
32 {0x00050040, nullptr, "SetRotation"}, 47 {0x00050040, nullptr, "SetRotation"},
33 {0x00070040, nullptr, "SetBlockAlignment"}, 48 {0x00070040, nullptr, "SetBlockAlignment"},
34 {0x000D0040, nullptr, "SetTransferEndInterrupt"}, 49 {0x000D0040, nullptr, "SetTransferEndInterrupt"},
35 {0x000F0000, nullptr, "GetTransferEndEvent"}, 50 {0x000F0000, GetTransferEndEvent, "GetTransferEndEvent"},
36 {0x00100102, nullptr, "SetSendingY"}, 51 {0x00100102, nullptr, "SetSendingY"},
37 {0x00110102, nullptr, "SetSendingU"}, 52 {0x00110102, nullptr, "SetSendingU"},
38 {0x00120102, nullptr, "SetSendingV"}, 53 {0x00120102, nullptr, "SetSendingV"},
@@ -53,6 +68,8 @@ const Interface::FunctionInfo FunctionTable[] = {
53// Interface class 68// Interface class
54 69
55Interface::Interface() { 70Interface::Interface() {
71 completion_event = Kernel::Event::Create(RESETTYPE_ONESHOT, "Y2R:Completed");
72
56 Register(FunctionTable); 73 Register(FunctionTable);
57} 74}
58 75