diff options
| author | 2018-01-22 13:50:22 -0500 | |
|---|---|---|
| committer | 2018-01-22 13:50:22 -0500 | |
| commit | 10c67bf39504aae36b06d4abe8055aaf6feeb2ad (patch) | |
| tree | bc59898e7fef3dfacffeb204db862b3cc19037f4 /src | |
| parent | AppletOE: Make ISelfController keep a reference to nvflinger. (diff) | |
| download | yuzu-10c67bf39504aae36b06d4abe8055aaf6feeb2ad.tar.gz yuzu-10c67bf39504aae36b06d4abe8055aaf6feeb2ad.tar.xz yuzu-10c67bf39504aae36b06d4abe8055aaf6feeb2ad.zip | |
AppletOE: Stubbed CreateManagedDisplayLayer to create a new layer in the Default display.
This function is used by libnx to obtain a new layer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/am/applet_oe.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/hle/service/am/applet_oe.cpp b/src/core/hle/service/am/applet_oe.cpp index f593840b3..7d16b45f3 100644 --- a/src/core/hle/service/am/applet_oe.cpp +++ b/src/core/hle/service/am/applet_oe.cpp | |||
| @@ -67,6 +67,7 @@ public: | |||
| 67 | {14, &ISelfController::SetRestartMessageEnabled, "SetRestartMessageEnabled"}, | 67 | {14, &ISelfController::SetRestartMessageEnabled, "SetRestartMessageEnabled"}, |
| 68 | {16, &ISelfController::SetOutOfFocusSuspendingEnabled, | 68 | {16, &ISelfController::SetOutOfFocusSuspendingEnabled, |
| 69 | "SetOutOfFocusSuspendingEnabled"}, | 69 | "SetOutOfFocusSuspendingEnabled"}, |
| 70 | {40, &ISelfController::CreateManagedDisplayLayer, "CreateManagedDisplayLayer"}, | ||
| 70 | }; | 71 | }; |
| 71 | RegisterHandlers(functions); | 72 | RegisterHandlers(functions); |
| 72 | } | 73 | } |
| @@ -147,6 +148,19 @@ private: | |||
| 147 | LOG_WARNING(Service, "(STUBBED) called"); | 148 | LOG_WARNING(Service, "(STUBBED) called"); |
| 148 | } | 149 | } |
| 149 | 150 | ||
| 151 | void CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx) { | ||
| 152 | // TODO(Subv): Find out how AM determines the display to use, for now just create the layer | ||
| 153 | // in the Default display. | ||
| 154 | u64 display_id = nvflinger->OpenDisplay("Default"); | ||
| 155 | u64 layer_id = nvflinger->CreateLayer(display_id); | ||
| 156 | |||
| 157 | IPC::RequestBuilder rb{ctx, 4}; | ||
| 158 | rb.Push(RESULT_SUCCESS); | ||
| 159 | rb.Push(layer_id); | ||
| 160 | |||
| 161 | LOG_WARNING(Service, "(STUBBED) called"); | ||
| 162 | } | ||
| 163 | |||
| 150 | std::shared_ptr<NVFlinger::NVFlinger> nvflinger; | 164 | std::shared_ptr<NVFlinger::NVFlinger> nvflinger; |
| 151 | }; | 165 | }; |
| 152 | 166 | ||