mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-23 02:47:51 +00:00

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>
14 lines
No EOL
300 B
C++
14 lines
No EOL
300 B
C++
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
namespace Common {
|
|
struct PowerStatus {
|
|
int percentage = -1;
|
|
bool charging = false;
|
|
bool has_battery = true;
|
|
};
|
|
|
|
PowerStatus GetPowerStatus();
|
|
} // namespace Common
|