mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-07 19:41:38 +12:00
Rename Handle to HorizonHandle, add metal-cpp submodule, format
This commit is contained in:
parent
855a374f67
commit
0f80d0af7a
46 changed files with 150 additions and 60 deletions
|
@ -102,6 +102,8 @@ namespace KernelMemoryTypes {
|
|||
}
|
||||
|
||||
class Memory {
|
||||
using Handle = HorizonHandle;
|
||||
|
||||
u8* fcram;
|
||||
u8* dspRam; // Provided to us by Audio
|
||||
u8* vram; // Provided to the memory class by the GPU class
|
||||
|
@ -213,8 +215,14 @@ private:
|
|||
}
|
||||
|
||||
enum class BatteryLevel {
|
||||
Empty = 0, AlmostEmpty, OneBar, TwoBars, ThreeBars, FourBars
|
||||
Empty = 0,
|
||||
AlmostEmpty,
|
||||
OneBar,
|
||||
TwoBars,
|
||||
ThreeBars,
|
||||
FourBars,
|
||||
};
|
||||
|
||||
u8 getBatteryState(bool adapterConnected, bool charging, BatteryLevel batteryLevel) {
|
||||
u8 value = static_cast<u8>(batteryLevel) << 2; // Bits 2:4 are the battery level from 0 to 5
|
||||
if (adapterConnected) value |= 1 << 0; // Bit 0 shows if the charger is connected
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue