diff options
Diffstat (limited to 'platform/osx')
-rw-r--r-- | platform/osx/os_osx.h | 2 | ||||
-rw-r--r-- | platform/osx/os_osx.mm | 2 | ||||
-rw-r--r-- | platform/osx/power_osx.cpp | 16 | ||||
-rw-r--r-- | platform/osx/power_osx.h | 6 |
4 files changed, 13 insertions, 13 deletions
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index ebaebd84ce..b5163609c2 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -212,7 +212,7 @@ public: virtual void set_ime_position(const Point2 &p_pos); virtual void set_ime_intermediate_text_callback(ImeCallback p_callback, void *p_inp); - virtual PowerState get_power_state(); + virtual OS::PowerState get_power_state(); virtual int get_power_seconds_left(); virtual int get_power_percent_left(); diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index f502fb9a9c..c18e3ff7c3 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1901,7 +1901,7 @@ String OS_OSX::get_joy_guid(int p_device) const { return input->get_joy_guid_remapped(p_device); } -PowerState OS_OSX::get_power_state() { +OS::PowerState OS_OSX::get_power_state() { return power_manager->get_power_state(); } diff --git a/platform/osx/power_osx.cpp b/platform/osx/power_osx.cpp index 5f3938cb91..eed03e63c1 100644 --- a/platform/osx/power_osx.cpp +++ b/platform/osx/power_osx.cpp @@ -174,7 +174,7 @@ bool power_osx::GetPowerInfo_MacOSX() { nsecs_left = -1; percent_left = -1; - power_state = POWERSTATE_UNKNOWN; + power_state = OS::POWERSTATE_UNKNOWN; if (blob != NULL) { CFArrayRef list = IOPSCopyPowerSourcesList(blob); @@ -194,13 +194,13 @@ bool power_osx::GetPowerInfo_MacOSX() { } if (!have_battery) { - power_state = POWERSTATE_NO_BATTERY; + power_state = OS::POWERSTATE_NO_BATTERY; } else if (charging) { - power_state = POWERSTATE_CHARGING; + power_state = OS::POWERSTATE_CHARGING; } else if (have_ac) { - power_state = POWERSTATE_CHARGED; + power_state = OS::POWERSTATE_CHARGED; } else { - power_state = POWERSTATE_ON_BATTERY; + power_state = OS::POWERSTATE_ON_BATTERY; } CFRelease(list); @@ -218,11 +218,11 @@ bool power_osx::UpdatePowerInfo() { return false; } -PowerState power_osx::get_power_state() { +OS::PowerState power_osx::get_power_state() { if (UpdatePowerInfo()) { return power_state; } else { - return POWERSTATE_UNKNOWN; + return OS::POWERSTATE_UNKNOWN; } } @@ -243,7 +243,7 @@ int power_osx::get_power_percent_left() { } power_osx::power_osx() - : nsecs_left(-1), percent_left(-1), power_state(POWERSTATE_UNKNOWN) { + : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) { } power_osx::~power_osx() { diff --git a/platform/osx/power_osx.h b/platform/osx/power_osx.h index 692c850d7c..20e47e9cd9 100644 --- a/platform/osx/power_osx.h +++ b/platform/osx/power_osx.h @@ -33,7 +33,7 @@ #include "dir_access_osx.h" #include "os/file_access.h" -#include "os/power.h" +#include "os/os.h" #include <CoreFoundation/CoreFoundation.h> class power_osx { @@ -41,7 +41,7 @@ class power_osx { private: int nsecs_left; int percent_left; - PowerState power_state; + OS::PowerState power_state; void checkps(CFDictionaryRef dict, bool *have_ac, bool *have_battery, bool *charging); bool GetPowerInfo_MacOSX(/*PowerState * state, int *seconds, int *percent*/); bool UpdatePowerInfo(); @@ -50,7 +50,7 @@ public: power_osx(); virtual ~power_osx(); - PowerState get_power_state(); + OS::PowerState get_power_state(); int get_power_seconds_left(); int get_power_percent_left(); }; |