draconisplusplus/src/os/macos.cpp

23 lines
337 B
C++
Raw Normal View History

2024-05-31 22:59:00 -04:00
#ifdef __APPLE__
#include <string>
2024-06-05 19:04:53 -04:00
#include <sys/sysctl.h>
#include "macos/NowPlayingBridge.h"
2024-05-31 22:59:00 -04:00
#include "os.h"
2024-05-29 00:28:54 -04:00
2024-06-01 06:59:01 -04:00
uint64_t GetMemInfo() {
2024-05-29 00:28:54 -04:00
uint64_t mem = 0;
2024-06-05 19:04:53 -04:00
size_t size = sizeof(mem);
2024-05-29 00:28:54 -04:00
sysctlbyname("hw.memsize", &mem, &size, nullptr, 0);
return mem;
}
2024-05-29 06:39:39 -04:00
2024-06-01 06:59:01 -04:00
std::string GetNowPlaying() {
2024-06-06 04:14:52 -04:00
return GetCurrentPlayingTitle();
2024-05-29 06:39:39 -04:00
}
2024-05-31 22:59:00 -04:00
#endif