2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

IPC: Make DuplicateSession return the Domain instead of the Session if the request was made on a Domain interface.

This commit is contained in:
Subv 2018-01-07 10:39:57 -05:00 committed by bunnei
parent e3b4c8e043
commit c12c756539
2 changed files with 7 additions and 2 deletions

View file

@ -11,8 +11,9 @@ namespace PCTL {
void PCTL_A::GetService(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service, "(STUBBED) called");
IPC::RequestBuilder rb{ctx, 1};
IPC::RequestBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
// TODO(Subv): This should return an IParentalControlService interface.
}
PCTL_A::PCTL_A() : ServiceFramework("pctl:a") {

View file

@ -23,6 +23,10 @@ void Controller::ConvertSessionToDomain(Kernel::HLERequestContext& ctx) {
void Controller::DuplicateSession(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb{ctx, 2, 0, 1};
rb.Push(RESULT_SUCCESS);
// TODO(Subv): Check if this is correct
if (ctx.IsDomain())
rb.PushMoveObjects(ctx.Domain());
else
rb.PushMoveObjects(ctx.ServerSession());
LOG_DEBUG(Service, "called");