3#if !defined(_WIN32) && !defined(__APPLE_CC__)
7#include <SDL2/SDL_syswm.h>
15 va_copy(argcopy, pargs);
16 retval = vsnprintf(NULL, 0, format, argcopy);
41 long pages = sysconf(_SC_PHYS_PAGES);
42 long page_size = sysconf(_SC_PAGESIZE);
53 SDL_VERSION(&wmInfo.version);
54 SDL_GetWindowWMInfo(
static_cast<SDL_Window*
>(window), &wmInfo);
56 handleOut._handle = wmInfo.info.x11.window;
63 sched_param sch_params;
65 pthread_getschedparam(thread, &policy, &sch_params);
70 sch_params.sched_priority = 10;
73 sch_params.sched_priority = 25;
76 sch_params.sched_priority = 50;
79 sch_params.sched_priority = 75;
82 sch_params.sched_priority = 85;
85 sch_params.sched_priority = 99;
89 if (!pthread_setschedparam(thread, SCHED_FIFO, &sch_params)) {
99 #include <sys/prctl.h>
102 pthread_setname_np(pthread_self(), threadName.data());
Str StringFormat(const char *fmt, Args &&...args)
Handle console commands that start with a forward slash.
void GetWindowHandle(void *window, WindowHandle &handleOut) noexcept
F32 PlatformDefaultDPI() noexcept
void SetThreadName(std::string_view threadName) noexcept
bool CallSystemCmd(std::string_view cmd, std::string_view args)
void SetThreadPriorityInternal(pthread_t thread, const ThreadPriority priority)
bool DebugBreak(const bool condition) noexcept
void SetThreadPriority(ThreadPriority priority)
void EnforceDPIScaling() noexcept
bool GetAvailableMemory(SysInfo &info)
size_t _availableRamInBytes