Rename Handle to HorizonHandle, add metal-cpp submodule, format
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user