mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-31 03:31:35 +00:00
8c33b0bb5d
Uses native power state methods to display battery percentage and charging state correctly. Mainly for qlaunch. Tested on Windows, Linux. Mac and Android Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/197 Co-authored-by: Maufeat <sahyno1996@gmail.com> Co-committed-by: Maufeat <sahyno1996@gmail.com>
32 lines
760 B
C++
32 lines
760 B
C++
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include "core/hle/service/service.h"
|
|
|
|
namespace Service::PTM {
|
|
|
|
class PSM final : public ServiceFramework<PSM> {
|
|
public:
|
|
explicit PSM(Core::System& system_);
|
|
~PSM() override;
|
|
|
|
private:
|
|
enum class ChargerType : u32 {
|
|
Unplugged = 0,
|
|
RegularCharger = 1,
|
|
LowPowerCharger = 2,
|
|
Unknown = 3,
|
|
};
|
|
|
|
void GetBatteryChargePercentage(HLERequestContext& ctx);
|
|
void GetChargerType(HLERequestContext& ctx);
|
|
void OpenSession(HLERequestContext& ctx);
|
|
};
|
|
|
|
} // namespace Service::PTM
|