diff options
| author | 2021-12-02 20:12:24 -0500 | |
|---|---|---|
| committer | 2021-12-02 20:12:24 -0500 | |
| commit | f138731e2fc46d44ae2dc3a15e0dd435d65ddb8d (patch) | |
| tree | d56f29c0e1672b24453d5eef28943c83345622ad /src | |
| parent | Merge pull request #7483 from zhaobot/tx-update-20211201022129 (diff) | |
| download | yuzu-f138731e2fc46d44ae2dc3a15e0dd435d65ddb8d.tar.gz yuzu-f138731e2fc46d44ae2dc3a15e0dd435d65ddb8d.tar.xz yuzu-f138731e2fc46d44ae2dc3a15e0dd435d65ddb8d.zip | |
service: am: ISelfController: Stub SaveCurrentScreenshot
- Used by Disney Magical World 2: Enchanted Edition
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 14 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.h | 1 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps.h | 2 |
3 files changed, 15 insertions, 2 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index aee8d4f93..e60661fe1 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include "core/hle/service/apm/apm_controller.h" | 30 | #include "core/hle/service/apm/apm_controller.h" |
| 31 | #include "core/hle/service/apm/apm_interface.h" | 31 | #include "core/hle/service/apm/apm_interface.h" |
| 32 | #include "core/hle/service/bcat/backend/backend.h" | 32 | #include "core/hle/service/bcat/backend/backend.h" |
| 33 | #include "core/hle/service/caps/caps.h" | ||
| 33 | #include "core/hle/service/filesystem/filesystem.h" | 34 | #include "core/hle/service/filesystem/filesystem.h" |
| 34 | #include "core/hle/service/ns/ns.h" | 35 | #include "core/hle/service/ns/ns.h" |
| 35 | #include "core/hle/service/nvflinger/nvflinger.h" | 36 | #include "core/hle/service/nvflinger/nvflinger.h" |
| @@ -298,7 +299,7 @@ ISelfController::ISelfController(Core::System& system_, NVFlinger::NVFlinger& nv | |||
| 298 | {91, &ISelfController::GetAccumulatedSuspendedTickChangedEvent, "GetAccumulatedSuspendedTickChangedEvent"}, | 299 | {91, &ISelfController::GetAccumulatedSuspendedTickChangedEvent, "GetAccumulatedSuspendedTickChangedEvent"}, |
| 299 | {100, &ISelfController::SetAlbumImageTakenNotificationEnabled, "SetAlbumImageTakenNotificationEnabled"}, | 300 | {100, &ISelfController::SetAlbumImageTakenNotificationEnabled, "SetAlbumImageTakenNotificationEnabled"}, |
| 300 | {110, nullptr, "SetApplicationAlbumUserData"}, | 301 | {110, nullptr, "SetApplicationAlbumUserData"}, |
| 301 | {120, nullptr, "SaveCurrentScreenshot"}, | 302 | {120, &ISelfController::SaveCurrentScreenshot, "SaveCurrentScreenshot"}, |
| 302 | {130, nullptr, "SetRecordVolumeMuted"}, | 303 | {130, nullptr, "SetRecordVolumeMuted"}, |
| 303 | {1000, nullptr, "GetDebugStorageChannel"}, | 304 | {1000, nullptr, "GetDebugStorageChannel"}, |
| 304 | }; | 305 | }; |
| @@ -579,6 +580,17 @@ void ISelfController::SetAlbumImageTakenNotificationEnabled(Kernel::HLERequestCo | |||
| 579 | rb.Push(ResultSuccess); | 580 | rb.Push(ResultSuccess); |
| 580 | } | 581 | } |
| 581 | 582 | ||
| 583 | void ISelfController::SaveCurrentScreenshot(Kernel::HLERequestContext& ctx) { | ||
| 584 | IPC::RequestParser rp{ctx}; | ||
| 585 | |||
| 586 | const auto album_report_option = rp.PopEnum<Capture::AlbumReportOption>(); | ||
| 587 | |||
| 588 | LOG_WARNING(Service_AM, "(STUBBED) called. album_report_option={}", album_report_option); | ||
| 589 | |||
| 590 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 591 | rb.Push(ResultSuccess); | ||
| 592 | } | ||
| 593 | |||
| 582 | AppletMessageQueue::AppletMessageQueue(Core::System& system) | 594 | AppletMessageQueue::AppletMessageQueue(Core::System& system) |
| 583 | : service_context{system, "AppletMessageQueue"} { | 595 | : service_context{system, "AppletMessageQueue"} { |
| 584 | on_new_message = service_context.CreateEvent("AMMessageQueue:OnMessageReceived"); | 596 | on_new_message = service_context.CreateEvent("AMMessageQueue:OnMessageReceived"); |
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index 202d20757..2a578aea5 100644 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h | |||
| @@ -151,6 +151,7 @@ private: | |||
| 151 | void GetAccumulatedSuspendedTickValue(Kernel::HLERequestContext& ctx); | 151 | void GetAccumulatedSuspendedTickValue(Kernel::HLERequestContext& ctx); |
| 152 | void GetAccumulatedSuspendedTickChangedEvent(Kernel::HLERequestContext& ctx); | 152 | void GetAccumulatedSuspendedTickChangedEvent(Kernel::HLERequestContext& ctx); |
| 153 | void SetAlbumImageTakenNotificationEnabled(Kernel::HLERequestContext& ctx); | 153 | void SetAlbumImageTakenNotificationEnabled(Kernel::HLERequestContext& ctx); |
| 154 | void SaveCurrentScreenshot(Kernel::HLERequestContext& ctx); | ||
| 154 | 155 | ||
| 155 | enum class ScreenshotPermission : u32 { | 156 | enum class ScreenshotPermission : u32 { |
| 156 | Inherit = 0, | 157 | Inherit = 0, |
diff --git a/src/core/hle/service/caps/caps.h b/src/core/hle/service/caps/caps.h index b18adcb9d..7254055e6 100644 --- a/src/core/hle/service/caps/caps.h +++ b/src/core/hle/service/caps/caps.h | |||
| @@ -24,7 +24,7 @@ enum class AlbumImageOrientation { | |||
| 24 | Orientation3 = 3, | 24 | Orientation3 = 3, |
| 25 | }; | 25 | }; |
| 26 | 26 | ||
| 27 | enum class AlbumReportOption { | 27 | enum class AlbumReportOption : s32 { |
| 28 | Disable = 0, | 28 | Disable = 0, |
| 29 | Enable = 1, | 29 | Enable = 1, |
| 30 | }; | 30 | }; |