pspTime cTime;
int errCode = sceRtcGetCurrentClockLocalTime(&cTime);
which works perfectly as an EBOOT.PBP. But when I've tried it as a plugin, it does not work. If I remove that code, the plugin works fine. Could it be that the rtc module is not yet loaded when the plugins run? What can I do to run it as soon as the PSP starts (vsh plugin)?
Update: It seems that other rtc.prx functions does not work too. If the said rtc function is removed, the plugin works perfect, but if added, succeeding plugin process is not working as if the plugin was terminated prematurely. I've tried to load and start rtc.prx module manually and still rtc functions does not work properly. :(
kururin wrote:Your problem is very simple.
You are using the rtc library, which is an user mode library, and in 3.XX kernel modules cannot use user functions.
The solution is to change this in the makefile:
from:
-lpsprtc
to:
-lpsprtc_driver
Thanks a lot! I love you! Lol. :D
EDIT: One problem though, the timezone does not work. The date/time given is the time with the timezone of 0.
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(_sbrk.o): In function `_sbrk':../../../../../../newlib/libc/sys/psp/libcglue.c:524: undefined reference to `sceKernelMaxFreeMemSize'
collect2: ld returned 1 exit status
make: *** [timezone_sampler.elf] Error 1