From ecd3afdc8e38ba98b5744f168efce27f2ab2fccc Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 17 Mar 2019 20:47:03 -0400 Subject: service/am: Unstub SetExpectedMasterVolume() This function passes in the desired main applet and library applet volume levels. We can then just pass those values back within the relevant volume getter functions, allowing us to unstub those as well. The initial values for the library and main applet volumes differ. The main applet volume is 0.25 by default, while the library applet volume is initialized to 1.0 by default in the services themselves. --- src/core/hle/service/am/am.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/core/hle/service/am/am.h') diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index b6113cfdd..bca06c25d 100644 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h @@ -82,7 +82,11 @@ private: void GetMainAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx); void GetLibraryAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx); - u32 volume{100}; + static constexpr float min_allowed_volume = 0.0f; + static constexpr float max_allowed_volume = 1.0f; + + float main_applet_volume{0.25f}; + float library_applet_volume{max_allowed_volume}; }; class IDisplayController final : public ServiceFramework { -- cgit v1.2.3