mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Add some power functions
This commit is contained in:
parent
085463c873
commit
40c5f0dc91
|
@ -1075,6 +1075,20 @@ namespace MiniEngine
|
|||
}
|
||||
}
|
||||
|
||||
int SDLSystem::GetPowerLifeLeft()
|
||||
{
|
||||
int i;
|
||||
SDL_GetPowerInfo(&i,NULL);
|
||||
return i;
|
||||
}
|
||||
|
||||
int SDLSystem::GetPowerPrecentageLeft()
|
||||
{
|
||||
int i;
|
||||
SDL_GetPowerInfo(NULL,&i);
|
||||
return i;
|
||||
}
|
||||
|
||||
Platform SDLSystem::GetPlatform()
|
||||
{
|
||||
std::string s(SDL_GetPlatform());
|
||||
|
|
|
@ -368,6 +368,8 @@ namespace MiniEngine
|
|||
static void Delay(int ms);
|
||||
|
||||
static PowerState GetPowerState();
|
||||
static int GetPowerLifeLeft();
|
||||
static int GetPowerPrecentageLeft();
|
||||
|
||||
static Platform GetPlatform();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user