mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-06 23:58:04 -04:00
psp, fix for pspdev update
This commit is contained in:
parent
af386f93c1
commit
33bde0c3c5
1 changed files with 2 additions and 2 deletions
|
@ -257,14 +257,14 @@ char *psp_get_status_line(void)
|
||||||
{
|
{
|
||||||
static char buff[64];
|
static char buff[64];
|
||||||
int ret, bat_percent, bat_time;
|
int ret, bat_percent, bat_time;
|
||||||
pspTime time;
|
ScePspDateTime time;
|
||||||
|
|
||||||
ret = sceRtcGetCurrentClockLocalTime(&time);
|
ret = sceRtcGetCurrentClockLocalTime(&time);
|
||||||
bat_percent = scePowerGetBatteryLifePercent();
|
bat_percent = scePowerGetBatteryLifePercent();
|
||||||
bat_time = scePowerGetBatteryLifeTime();
|
bat_time = scePowerGetBatteryLifeTime();
|
||||||
if (ret < 0 || bat_percent < 0 || bat_time < 0) return NULL;
|
if (ret < 0 || bat_percent < 0 || bat_time < 0) return NULL;
|
||||||
|
|
||||||
snprintf(buff, sizeof(buff), "%02i:%02i bat: %3i%%", time.hour, time.minutes, bat_percent);
|
snprintf(buff, sizeof(buff), "%02i:%02i bat: %3i%%", time.hour, time.minute, bat_percent);
|
||||||
if (!scePowerIsPowerOnline())
|
if (!scePowerIsPowerOnline())
|
||||||
snprintf(buff+strlen(buff), sizeof(buff)-strlen(buff), " (%i:%02i)", bat_time/60, bat_time%60);
|
snprintf(buff+strlen(buff), sizeof(buff)-strlen(buff), " (%i:%02i)", bat_time/60, bat_time%60);
|
||||||
return buff;
|
return buff;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue