diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2024-02-14 18:02:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-14 18:02:38 +0100 |
commit | 1e8554b01f007d86e0740e44ab50c59d12d5c9f5 (patch) | |
tree | c8749abcba107559141113f2b997238087b18d52 /src/core/hle/service/am/service/common_state_getter.h | |
parent | Merge pull request #13009 from t895/message-dialog-fix (diff) | |
parent | am: move out omm interfaces to new module (diff) | |
download | yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar.gz yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar.bz2 yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar.lz yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar.xz yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar.zst yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.zip |
Diffstat (limited to 'src/core/hle/service/am/service/common_state_getter.h')
-rw-r--r-- | src/core/hle/service/am/service/common_state_getter.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/core/hle/service/am/service/common_state_getter.h b/src/core/hle/service/am/service/common_state_getter.h new file mode 100644 index 000000000..5a8dca3d6 --- /dev/null +++ b/src/core/hle/service/am/service/common_state_getter.h @@ -0,0 +1,61 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/service/am/am_types.h" +#include "core/hle/service/apm/apm_controller.h" +#include "core/hle/service/cmif_types.h" +#include "core/hle/service/pm/pm.h" +#include "core/hle/service/service.h" + +namespace Kernel { +class KReadableEvent; +} + +namespace Service::AM { + +struct Applet; +class ILockAccessor; + +class ICommonStateGetter final : public ServiceFramework<ICommonStateGetter> { +public: + explicit ICommonStateGetter(Core::System& system_, std::shared_ptr<Applet> applet_); + ~ICommonStateGetter() override; + +private: + Result GetEventHandle(OutCopyHandle<Kernel::KReadableEvent> out_event); + Result ReceiveMessage(Out<AppletMessage> out_applet_message); + Result GetCurrentFocusState(Out<FocusState> out_focus_state); + Result RequestToAcquireSleepLock(); + Result GetAcquiredSleepLockEvent(OutCopyHandle<Kernel::KReadableEvent> out_event); + Result GetReaderLockAccessorEx(Out<SharedPointer<ILockAccessor>> out_lock_accessor, + u32 button_type); + Result GetWriterLockAccessorEx(Out<SharedPointer<ILockAccessor>> out_lock_accessor, + u32 button_type); + Result GetDefaultDisplayResolutionChangeEvent(OutCopyHandle<Kernel::KReadableEvent> out_event); + Result GetOperationMode(Out<OperationMode> out_operation_mode); + Result GetPerformanceMode(Out<APM::PerformanceMode> out_performance_mode); + Result GetBootMode(Out<PM::SystemBootMode> out_boot_mode); + Result IsVrModeEnabled(Out<bool> out_is_vr_mode_enabled); + Result SetVrModeEnabled(bool is_vr_mode_enabled); + Result SetLcdBacklighOffEnabled(bool is_lcd_backlight_off_enabled); + Result BeginVrModeEx(); + Result EndVrModeEx(); + Result IsInControllerFirmwareUpdateSection( + Out<bool> out_is_in_controller_firmware_update_section); + Result GetDefaultDisplayResolution(Out<s32> out_width, Out<s32> out_height); + Result GetBuiltInDisplayType(Out<s32> out_display_type); + Result PerformSystemButtonPressingIfInFocus(SystemButtonType type); + Result GetOperationModeSystemInfo(Out<u32> out_operation_mode_system_info); + Result GetAppletLaunchedHistory(Out<s32> out_count, + OutArray<AppletId, BufferAttr_HipcMapAlias> out_applet_ids); + Result GetSettingsPlatformRegion(Out<SysPlatformRegion> out_settings_platform_region); + Result SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(); + + void SetCpuBoostMode(HLERequestContext& ctx); + + const std::shared_ptr<Applet> m_applet; +}; + +} // namespace Service::AM |