Skip to content
Snippets Groups Projects
Commit 10c67bf3 authored by Subv's avatar Subv
Browse files

AppletOE: Stubbed CreateManagedDisplayLayer to create a new layer in the Default display.

This function is used by libnx to obtain a new layer.
parent eb58f852
No related branches found
No related tags found
No related merge requests found
...@@ -67,6 +67,7 @@ public: ...@@ -67,6 +67,7 @@ public:
{14, &ISelfController::SetRestartMessageEnabled, "SetRestartMessageEnabled"}, {14, &ISelfController::SetRestartMessageEnabled, "SetRestartMessageEnabled"},
{16, &ISelfController::SetOutOfFocusSuspendingEnabled, {16, &ISelfController::SetOutOfFocusSuspendingEnabled,
"SetOutOfFocusSuspendingEnabled"}, "SetOutOfFocusSuspendingEnabled"},
{40, &ISelfController::CreateManagedDisplayLayer, "CreateManagedDisplayLayer"},
}; };
RegisterHandlers(functions); RegisterHandlers(functions);
} }
...@@ -147,6 +148,19 @@ private: ...@@ -147,6 +148,19 @@ private:
LOG_WARNING(Service, "(STUBBED) called"); LOG_WARNING(Service, "(STUBBED) called");
} }
void CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx) {
// TODO(Subv): Find out how AM determines the display to use, for now just create the layer
// in the Default display.
u64 display_id = nvflinger->OpenDisplay("Default");
u64 layer_id = nvflinger->CreateLayer(display_id);
IPC::RequestBuilder rb{ctx, 4};
rb.Push(RESULT_SUCCESS);
rb.Push(layer_id);
LOG_WARNING(Service, "(STUBBED) called");
}
std::shared_ptr<NVFlinger::NVFlinger> nvflinger; std::shared_ptr<NVFlinger::NVFlinger> nvflinger;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment