Merge branch 'master' into next

This commit is contained in:
Alam Ed Arias 2023-10-22 11:14:13 -04:00
commit a68440c4db
2 changed files with 16 additions and 9 deletions

View file

@ -14,13 +14,18 @@ size_t I_GetFreeMem(size_t *total)
return 0;
}
void I_Sleep(UINT32 ms){}
void I_Sleep(UINT32 ms)
{
(void)ms;
}
precise_t I_GetPreciseTime(void) {
precise_t I_GetPreciseTime(void)
{
return 0;
}
UINT64 I_GetPrecisePrecision(void) {
UINT64 I_GetPrecisePrecision(void)
{
return 1000000;
}
@ -182,10 +187,12 @@ const char *I_ClipboardPaste(void)
size_t I_GetRandomBytes(char *destination, size_t amount)
{
(void)destination;
(void)amount;
return 0;
}
void I_RegisterSysCommands(void) {}
void I_RegisterSysCommands(void){}
void I_GetCursorPosition(INT32 *x, INT32 *y)
{

View file

@ -3035,11 +3035,11 @@ size_t I_GetFreeMem(size_t *total)
#ifdef FREEBSD
u_int v_free_count, v_page_size, v_page_count;
size_t size = sizeof(v_free_count);
sysctlbyname("vm.stat.vm.v_free_count", &v_free_count, &size, NULL, 0);
size_t size = sizeof(v_page_size);
sysctlbyname("vm.stat.vm.v_page_size", &v_page_size, &size, NULL, 0);
size_t size = sizeof(v_page_count);
sysctlbyname("vm.stat.vm.v_page_count", &v_page_count, &size, NULL, 0);
sysctlbyname("vm.stats.vm.v_free_count", &v_free_count, &size, NULL, 0);
size = sizeof(v_page_size);
sysctlbyname("vm.stats.vm.v_page_size", &v_page_size, &size, NULL, 0);
size = sizeof(v_page_count);
sysctlbyname("vm.stats.vm.v_page_count", &v_page_count, &size, NULL, 0);
if (total)
*total = v_page_count * v_page_size;