Add some power functions

This commit is contained in:
Kirigaya Kazuto 2017-04-12 09:26:03 +08:00
parent 085463c873
commit 40c5f0dc91
2 changed files with 16 additions and 0 deletions

View File

@ -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());

View File

@ -368,6 +368,8 @@ namespace MiniEngine
static void Delay(int ms);
static PowerState GetPowerState();
static int GetPowerLifeLeft();
static int GetPowerPrecentageLeft();
static Platform GetPlatform();