summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/hle/service/am/am.cpp20
-rw-r--r--src/core/hle/service/am/am.h1
2 files changed, 20 insertions, 1 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index 24cfb370b..c688d6d98 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -272,7 +272,7 @@ ISelfController::ISelfController(Core::System& system,
272 {41, nullptr, "IsSystemBufferSharingEnabled"}, 272 {41, nullptr, "IsSystemBufferSharingEnabled"},
273 {42, nullptr, "GetSystemSharedLayerHandle"}, 273 {42, nullptr, "GetSystemSharedLayerHandle"},
274 {43, nullptr, "GetSystemSharedBufferHandle"}, 274 {43, nullptr, "GetSystemSharedBufferHandle"},
275 {44, nullptr, "CreateManagedDisplaySeparableLayer"}, 275 {44, &ISelfController::CreateManagedDisplaySeparableLayer, "CreateManagedDisplaySeparableLayer"},
276 {45, nullptr, "SetManagedDisplayLayerSeparationMode"}, 276 {45, nullptr, "SetManagedDisplayLayerSeparationMode"},
277 {50, &ISelfController::SetHandlesRequestToDisplay, "SetHandlesRequestToDisplay"}, 277 {50, &ISelfController::SetHandlesRequestToDisplay, "SetHandlesRequestToDisplay"},
278 {51, nullptr, "ApproveToDisplay"}, 278 {51, nullptr, "ApproveToDisplay"},
@@ -462,6 +462,24 @@ void ISelfController::CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx)
462 rb.Push(*layer_id); 462 rb.Push(*layer_id);
463} 463}
464 464
465void ISelfController::CreateManagedDisplaySeparableLayer(Kernel::HLERequestContext& ctx) {
466 LOG_WARNING(Service_AM, "(STUBBED) called");
467
468 // TODO(Subv): Find out how AM determines the display to use, for now just
469 // create the layer in the Default display.
470 // This calls nn::vi::CreateRecordingLayer() which creates another layer.
471 // Currently we do not support more than 1 layer per display, output 1 layer id for now.
472 // Outputting 1 layer id instead of the expected 2 has not been observed to cause any adverse
473 // side effects.
474 // TODO: Support multiple layers
475 const auto display_id = nvflinger->OpenDisplay("Default");
476 const auto layer_id = nvflinger->CreateLayer(*display_id);
477
478 IPC::ResponseBuilder rb{ctx, 4};
479 rb.Push(RESULT_SUCCESS);
480 rb.Push(*layer_id);
481}
482
465void ISelfController::SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx) { 483void ISelfController::SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx) {
466 LOG_WARNING(Service_AM, "(STUBBED) called"); 484 LOG_WARNING(Service_AM, "(STUBBED) called");
467 485
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h
index 2f69466ec..6cfb11b48 100644
--- a/src/core/hle/service/am/am.h
+++ b/src/core/hle/service/am/am.h
@@ -140,6 +140,7 @@ private:
140 void SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx); 140 void SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx);
141 void SetAlbumImageOrientation(Kernel::HLERequestContext& ctx); 141 void SetAlbumImageOrientation(Kernel::HLERequestContext& ctx);
142 void CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx); 142 void CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx);
143 void CreateManagedDisplaySeparableLayer(Kernel::HLERequestContext& ctx);
143 void SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx); 144 void SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx);
144 void SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx); 145 void SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);
145 void GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx); 146 void GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);