diff options
| author | 2015-02-24 08:28:36 -0500 | |
|---|---|---|
| committer | 2015-02-24 08:28:36 -0500 | |
| commit | ef66feaebaa5285ad475ab8bb61209fc5eac979a (patch) | |
| tree | 04e4335fb7426a15c17a0342bc76d08e7993d5b2 | |
| parent | Merge pull request #595 from linkmauve/new-3ds-input (diff) | |
| download | yuzu-ef66feaebaa5285ad475ab8bb61209fc5eac979a.tar.gz yuzu-ef66feaebaa5285ad475ab8bb61209fc5eac979a.tar.xz yuzu-ef66feaebaa5285ad475ab8bb61209fc5eac979a.zip | |
Services: Implemented Y2R_U::GetTransferEndEvent
Aero Porter was throwing an "Invalid Handle" fatal error without this.
| -rw-r--r-- | src/core/hle/service/y2r_u.cpp | 19 |
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 | ||
| 12 | namespace Y2R_U { | 12 | namespace Y2R_U { |
| 13 | 13 | ||
| 14 | static 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 | */ | ||
| 37 | static 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 | |||
| 29 | const Interface::FunctionInfo FunctionTable[] = { | 44 | const 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 | ||
| 55 | Interface::Interface() { | 70 | Interface::Interface() { |
| 71 | completion_event = Kernel::Event::Create(RESETTYPE_ONESHOT, "Y2R:Completed"); | ||
| 72 | |||
| 56 | Register(FunctionTable); | 73 | Register(FunctionTable); |
| 57 | } | 74 | } |
| 58 | 75 | ||