Files
Tushar Rohilla e5295f36aa Add Afterglow 1.0.6, a PS5 internet radio and music visualizer
222 stations in 17 genres, 56 visualizer scenes, Ogg and Opus playback, station logos, crossfade, My Music from USB, a command box and live BPM sync.
2026-10-16 00:59:10 -04:00

53 lines
900 B
C++

// ps5-homebrew-ui - Host (Linux/WSL) implementation of the system services.
// Copyright (C) 2026 BlackBearReloaded
// SPDX-License-Identifier: GPL-3.0-or-later
#include "platform/ps5/system.hpp"
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <unistd.h>
namespace hui::sys
{
std::int64_t monotonic_us()
{
timespec now{};
clock_gettime(CLOCK_MONOTONIC, &now);
return static_cast<std::int64_t>(now.tv_sec) * 1000000 + now.tv_nsec / 1000;
}
void log(const char *format, ...)
{
va_list arguments;
va_start(arguments, format);
std::vfprintf(stderr, format, arguments);
va_end(arguments);
std::fputc('\n', stderr);
}
bool hide_splash_screen()
{
return true;
}
void sleep_us(std::uint32_t microseconds)
{
usleep(microseconds);
}
void park()
{
std::exit(1);
}
void quit()
{
std::exit(0);
}
} // namespace hui::sys