mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Add system info querying functions (CPU,RAM)
This commit is contained in:
parent
6df4068539
commit
cbb780a9da
|
@ -2347,6 +2347,24 @@ namespace MiniEngine
|
|||
return std::make_tuple(ptr->major,ptr->minor,ptr->patch);
|
||||
}
|
||||
|
||||
//static
|
||||
int SDLSystem::GetCPUCount()
|
||||
{
|
||||
return SDL_GetCPUCount();
|
||||
}
|
||||
|
||||
//static
|
||||
int SDLSystem::GetCPUCacheLineSize()
|
||||
{
|
||||
return SDL_GetCPUCacheLineSize();
|
||||
}
|
||||
|
||||
//static
|
||||
int SDLSystem::GetSystemRAM()
|
||||
{
|
||||
return SDL_GetSystemRAM();
|
||||
}
|
||||
|
||||
/// Global Executor For class Timer
|
||||
Uint32 _global_timer_executor(Uint32 interval,void* param)
|
||||
{
|
||||
|
|
|
@ -634,6 +634,11 @@ namespace MiniEngine
|
|||
static std::tuple<int,int,int> GetTTFCompileVersion();
|
||||
static std::tuple<int,int,int> GetTTFLinkedVersion();
|
||||
|
||||
static int GetCPUCount();
|
||||
static int GetCPUCacheLineSize();
|
||||
/// RAM is calculated in MB.
|
||||
static int GetSystemRAM();
|
||||
|
||||
class Android
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue
Block a user