3DSident/source/power.c
Joel16 99fc2e4c58 Merge upstream changes from GUI
Basically cleaning up and making sure functions succeed before returning the result.
2017-09-15 11:16:13 -05:00

17 lines
262 B
C

#include "power.h"
#include "screenshot.h"
const char * batteryStatus(void)
{
u8 batteryStatus;
if (R_SUCCEEDED(PTMU_GetBatteryChargeState(&batteryStatus)))
{
if (batteryStatus)
return "charging";
return "not charging";
}
return NULL;
}