mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-04 21:29:36 +00:00
Add Device Power State (Windows, Linux, Mac and Android) (#197)
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>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// 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
|
||||
Reference in New Issue
Block a user