diff options
| author | 2023-10-01 11:59:50 -0600 | |
|---|---|---|
| committer | 2023-10-02 11:29:12 -0600 | |
| commit | 2fa53ec1d90ab6b2c126fbe42ac73b4ea74cc726 (patch) | |
| tree | 9aa78ae7069ccef4edd56d16130bb5dd8c18c65c /src/core | |
| parent | externals: Add stb_image and stb_image_resize (diff) | |
| download | yuzu-2fa53ec1d90ab6b2c126fbe42ac73b4ea74cc726.tar.gz yuzu-2fa53ec1d90ab6b2c126fbe42ac73b4ea74cc726.tar.xz yuzu-2fa53ec1d90ab6b2c126fbe42ac73b4ea74cc726.zip | |
yuzu: Allow to launch album applet from firmware
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 20 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.h | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 819dea6a7..a92243fc7 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -1493,6 +1493,9 @@ ILibraryAppletSelfAccessor::ILibraryAppletSelfAccessor(Core::System& system_) | |||
| 1493 | case Applets::AppletId::MiiEdit: | 1493 | case Applets::AppletId::MiiEdit: |
| 1494 | PushInShowMiiEditData(); | 1494 | PushInShowMiiEditData(); |
| 1495 | break; | 1495 | break; |
| 1496 | case Applets::AppletId::PhotoViewer: | ||
| 1497 | PushInShowAlbum(); | ||
| 1498 | break; | ||
| 1496 | default: | 1499 | default: |
| 1497 | break; | 1500 | break; |
| 1498 | } | 1501 | } |
| @@ -1569,6 +1572,23 @@ void ILibraryAppletSelfAccessor::GetCallerAppletIdentityInfo(HLERequestContext& | |||
| 1569 | rb.PushRaw(applet_info); | 1572 | rb.PushRaw(applet_info); |
| 1570 | } | 1573 | } |
| 1571 | 1574 | ||
| 1575 | void ILibraryAppletSelfAccessor::PushInShowAlbum() { | ||
| 1576 | const Applets::CommonArguments arguments{ | ||
| 1577 | .arguments_version = Applets::CommonArgumentVersion::Version3, | ||
| 1578 | .size = Applets::CommonArgumentSize::Version3, | ||
| 1579 | .library_version = 1, | ||
| 1580 | .theme_color = Applets::ThemeColor::BasicBlack, | ||
| 1581 | .play_startup_sound = true, | ||
| 1582 | .system_tick = system.CoreTiming().GetClockTicks(), | ||
| 1583 | }; | ||
| 1584 | |||
| 1585 | std::vector<u8> argument_data(sizeof(arguments)); | ||
| 1586 | std::vector<u8> settings_data{2}; | ||
| 1587 | std::memcpy(argument_data.data(), &arguments, sizeof(arguments)); | ||
| 1588 | queue_data.emplace_back(std::move(argument_data)); | ||
| 1589 | queue_data.emplace_back(std::move(settings_data)); | ||
| 1590 | } | ||
| 1591 | |||
| 1572 | void ILibraryAppletSelfAccessor::PushInShowCabinetData() { | 1592 | void ILibraryAppletSelfAccessor::PushInShowCabinetData() { |
| 1573 | const Applets::CommonArguments arguments{ | 1593 | const Applets::CommonArguments arguments{ |
| 1574 | .arguments_version = Applets::CommonArgumentVersion::Version3, | 1594 | .arguments_version = Applets::CommonArgumentVersion::Version3, |
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index 349482dcc..62994a13f 100644 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h | |||
| @@ -327,6 +327,7 @@ private: | |||
| 327 | void ExitProcessAndReturn(HLERequestContext& ctx); | 327 | void ExitProcessAndReturn(HLERequestContext& ctx); |
| 328 | void GetCallerAppletIdentityInfo(HLERequestContext& ctx); | 328 | void GetCallerAppletIdentityInfo(HLERequestContext& ctx); |
| 329 | 329 | ||
| 330 | void PushInShowAlbum(); | ||
| 330 | void PushInShowCabinetData(); | 331 | void PushInShowCabinetData(); |
| 331 | void PushInShowMiiEditData(); | 332 | void PushInShowMiiEditData(); |
| 332 | 333 | ||