Code: Select all
main.o: In function `make_top()':
main.cpp:(.text+0x8): undefined reference to `scePowerIsBatteryCharging'
main.cpp:(.text+0x40): undefined reference to `scePowerGetBatteryLifePercent'
main.cpp:(.text+0x50): undefined reference to `blife'
main.cpp:(.text+0x5c): undefined reference to `blife'
main.o: In function `main':
main.cpp:(.text+0x108): undefined reference to `scePowerIsBatteryCharging'
collect2: ld returned 1 exit status
make: *** [hello.elf] Error 1
Code: Select all
int make_top(void)
{
int extern blife;
if (scePowerIsBatteryCharging())
{
printf("GFXChanger 0.1 by MaX911 battery: charging \n");
printf("-------------------------------------------------------------------");
return 0;
}
blife = scePowerGetBatteryLifePercent();
printf("GFXChanger 0.1 by MaX911 battery: %s \n", blife);
printf("-------------------------------------------------------------------");
return 0;
}
int main()
{
pspDebugScreenInit();
SetupCallbacks();
SceCtrlData pad;
make_top();
if (scePowerIsLowBattery)
{
printf("\n\n\n\n\n\n\n Battery Power is low, please plug in charger to continue.");
while (1)
{
if (scePowerIsBatteryCharging())
{
break;
}
}
pspDebugScreenClear();
make_top();
printf("\n\n\n\n\n\n\n Charger detected, press [X] to continue.");
sceCtrlReadBufferPositive(&pad, 1);
if (pad.Buttons & PSP_CTRL_CROSS)
{
pspDebugScreenClear();
make_top();
}
}
sceKernelSleepThread();
return 0;
}