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 1bb544dd8..2642c24cc 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -271,7 +271,7 @@ ISelfController::ISelfController(Core::System& system,
271 {41, nullptr, "IsSystemBufferSharingEnabled"}, 271 {41, nullptr, "IsSystemBufferSharingEnabled"},
272 {42, nullptr, "GetSystemSharedLayerHandle"}, 272 {42, nullptr, "GetSystemSharedLayerHandle"},
273 {43, nullptr, "GetSystemSharedBufferHandle"}, 273 {43, nullptr, "GetSystemSharedBufferHandle"},
274 {44, nullptr, "CreateManagedDisplaySeparableLayer"}, 274 {44, &ISelfController::CreateManagedDisplaySeparableLayer, "CreateManagedDisplaySeparableLayer"},
275 {45, nullptr, "SetManagedDisplayLayerSeparationMode"}, 275 {45, nullptr, "SetManagedDisplayLayerSeparationMode"},
276 {50, &ISelfController::SetHandlesRequestToDisplay, "SetHandlesRequestToDisplay"}, 276 {50, &ISelfController::SetHandlesRequestToDisplay, "SetHandlesRequestToDisplay"},
277 {51, nullptr, "ApproveToDisplay"}, 277 {51, nullptr, "ApproveToDisplay"},
@@ -461,6 +461,24 @@ void ISelfController::CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx)
461 rb.Push(*layer_id); 461 rb.Push(*layer_id);
462} 462}
463 463
464void ISelfController::CreateManagedDisplaySeparableLayer(Kernel::HLERequestContext& ctx) {
465 LOG_WARNING(Service_AM, "(STUBBED) called");
466
467 // TODO(Subv): Find out how AM determines the display to use, for now just
468 // create the layer in the Default display.
469 // This calls nn::vi::CreateRecordingLayer() which creates another layer.
470 // Currently we do not support more than 1 layer per display, output 1 layer id for now.
471 // Outputting 1 layer id instead of the expected 2 has not been observed to cause any adverse
472 // side effects.
473 // TODO: Support multiple layers
474 const auto display_id = nvflinger->OpenDisplay("Default");
475 const auto layer_id = nvflinger->CreateLayer(*display_id);
476
477 IPC::ResponseBuilder rb{ctx, 4};
478 rb.Push(RESULT_SUCCESS);
479 rb.Push(*layer_id);
480}
481
464void ISelfController::SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx) { 482void ISelfController::SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx) {
465 LOG_WARNING(Service_AM, "(STUBBED) called"); 483 LOG_WARNING(Service_AM, "(STUBBED) called");
466 484
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);