3#if defined(__APPLE_CC__)
12 bool DebugBreak(
const bool condition)
noexcept {
31 I32 mib[2] = { CTL_HW, HW_MEMSIZE };
32 U32 namelen =
sizeof(mib) /
sizeof(mib[0]);
34 size_t len =
sizeof(size);
35 if (sysctl(mib, namelen, &size, &len, NULL, 0) < 0) {
38 info._availableRamInBytes =
to_size(size);
50 SDL_VERSION(&wmInfo.version);
51 SDL_GetWindowWMInfo(
static_cast<SDL_Window*
>(window), &wmInfo);
53 handleOut._handle = wmInfo.info.cocoa.window;
60 sched_param sch_params;
62 pthread_getschedparam(thread, &policy, &sch_params);
66 sch_params.sched_priority = 10;
69 sch_params.sched_priority = 25;
72 sch_params.sched_priority = 50;
75 sch_params.sched_priority = 75;
78 sch_params.sched_priority = 85;
81 sch_params.sched_priority = 99;
85 if (!pthread_setschedparam(thread, SCHED_FIFO, &sch_params)) {
94 #include <sys/prctl.h>
95 void SetThreadName(
const std::string_view threadName)
noexcept {
96 pthread_setname_np(pthread_self(), threadName.data());
99 bool CallSystemCmd(
const char* cmd,
const std::string_view args) {
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
constexpr size_t to_size(const T value)
bool GetAvailableMemory(SysInfo &info)