galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
Laptop.hpp
Go to the documentation of this file.
1
7
8#ifndef GALAXY_PLATFORM_LAPTOP_HPP_
9#define GALAXY_PLATFORM_LAPTOP_HPP_
10
11#include <cstdint>
12
14
15#ifdef GALAXY_WIN_PLATFORM
16extern "C"
17{
18 // http://developer.amd.com/community/blog/2015/10/02/amd-enduro-system-for-developers/
19 // http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
20
21 inline __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
22 inline __declspec(dllexport) std::uint32_t NvOptimusEnablement = 0x00000001;
23}
24#elif
25{
26 inline int AmdPowerXpressRequestHighPerformance = 1;
27 inline std::uint32_t NvOptimusEnablement = 0x00000001;
28}
29#endif
30
31namespace galaxy
32{
33 namespace laptop
34 {
42 [[nodiscard]]
43 int get_battery_remaining(const bool percent = true) noexcept;
44
50 [[nodiscard]]
51 SDL_PowerState get_battery_status() noexcept;
52 } // namespace laptop
53} // namespace galaxy
54
55#endif
SDL_PowerState get_battery_status() noexcept
Get battery status.
Definition Laptop.cpp:25
int get_battery_remaining(const bool percent) noexcept
Get remaining battery charge of a laptop.
Definition Laptop.cpp:16
Timer.hpp galaxy.
Definition Timer.cpp:18