mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-15 21:22:54 +00:00
AM/ISelfController: Stub CreateManagedDisplaySeparableLayer
Stub this by sending 1 layer id instead of 2 as yuzu does not support multiple layers per display. No adverse side effects have been observed. - Used by Animal Crossing: New Horizons Update 1.3.0
This commit is contained in:
parent
52882a93a5
commit
c0dc8f9d25
|
@ -271,7 +271,7 @@ ISelfController::ISelfController(Core::System& system,
|
||||||
{41, nullptr, "IsSystemBufferSharingEnabled"},
|
{41, nullptr, "IsSystemBufferSharingEnabled"},
|
||||||
{42, nullptr, "GetSystemSharedLayerHandle"},
|
{42, nullptr, "GetSystemSharedLayerHandle"},
|
||||||
{43, nullptr, "GetSystemSharedBufferHandle"},
|
{43, nullptr, "GetSystemSharedBufferHandle"},
|
||||||
{44, nullptr, "CreateManagedDisplaySeparableLayer"},
|
{44, &ISelfController::CreateManagedDisplaySeparableLayer, "CreateManagedDisplaySeparableLayer"},
|
||||||
{45, nullptr, "SetManagedDisplayLayerSeparationMode"},
|
{45, nullptr, "SetManagedDisplayLayerSeparationMode"},
|
||||||
{50, &ISelfController::SetHandlesRequestToDisplay, "SetHandlesRequestToDisplay"},
|
{50, &ISelfController::SetHandlesRequestToDisplay, "SetHandlesRequestToDisplay"},
|
||||||
{51, nullptr, "ApproveToDisplay"},
|
{51, nullptr, "ApproveToDisplay"},
|
||||||
|
@ -461,6 +461,24 @@ void ISelfController::CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx)
|
||||||
rb.Push(*layer_id);
|
rb.Push(*layer_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ISelfController::CreateManagedDisplaySeparableLayer(Kernel::HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
|
// TODO(Subv): Find out how AM determines the display to use, for now just
|
||||||
|
// create the layer in the Default display.
|
||||||
|
// This calls nn::vi::CreateRecordingLayer() which creates another layer.
|
||||||
|
// Currently we do not support more than 1 layer per display, output 1 layer id for now.
|
||||||
|
// Outputting 1 layer id instead of the expected 2 has not been observed to cause any adverse
|
||||||
|
// side effects.
|
||||||
|
// TODO: Support multiple layers
|
||||||
|
const auto display_id = nvflinger->OpenDisplay("Default");
|
||||||
|
const auto layer_id = nvflinger->CreateLayer(*display_id);
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
rb.Push(*layer_id);
|
||||||
|
}
|
||||||
|
|
||||||
void ISelfController::SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
|
|
|
@ -140,6 +140,7 @@ private:
|
||||||
void SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx);
|
void SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx);
|
||||||
void SetAlbumImageOrientation(Kernel::HLERequestContext& ctx);
|
void SetAlbumImageOrientation(Kernel::HLERequestContext& ctx);
|
||||||
void CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx);
|
void CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx);
|
||||||
|
void CreateManagedDisplaySeparableLayer(Kernel::HLERequestContext& ctx);
|
||||||
void SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx);
|
void SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx);
|
||||||
void SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);
|
void SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);
|
||||||
void GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);
|
void GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);
|
||||||
|
|
Loading…
Reference in a new issue