Merge pull request #10464 from phcoder/vitasleep

Add usleep and sleep on Vita.
This commit is contained in:
Autechre 2020-04-17 01:47:56 +02:00 committed by GitHub
commit c8555924e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -557,6 +557,22 @@ static uint64_t frontend_psp_get_mem_used(void)
}
#endif
// stdlibc++ references usleep but it's not available.
// This is a workaround
#ifdef VITA
int usleep(uint64_t usec)
{
sceKernelDelayThread(usec);
return 0;
}
unsigned int sleep(unsigned int seconds)
{
sceKernelDelayThread(seconds * 1000000LL);
return 0;
}
#endif
frontend_ctx_driver_t frontend_ctx_psp = {
frontend_psp_get_environment_settings,
frontend_psp_init,