diff options
Diffstat (limited to 'platform/x11')
-rw-r--r-- | platform/x11/export/export.cpp | 1 | ||||
-rw-r--r-- | platform/x11/joypad_linux.cpp | 1 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 2 | ||||
-rw-r--r-- | platform/x11/os_x11.h | 2 | ||||
-rw-r--r-- | platform/x11/power_x11.cpp | 42 | ||||
-rw-r--r-- | platform/x11/power_x11.h | 6 |
6 files changed, 27 insertions, 27 deletions
diff --git a/platform/x11/export/export.cpp b/platform/x11/export/export.cpp index 59b1a44247..fdb43c9ae0 100644 --- a/platform/x11/export/export.cpp +++ b/platform/x11/export/export.cpp @@ -50,6 +50,7 @@ void register_x11_exporter() { platform->set_release_64("linux_x11_64_release"); platform->set_debug_64("linux_x11_64_debug"); platform->set_os_name("X11"); + platform->set_chmod_flags(0755); EditorExport::get_singleton()->add_export_platform(platform); } diff --git a/platform/x11/joypad_linux.cpp b/platform/x11/joypad_linux.cpp index 3453297716..428385f7cb 100644 --- a/platform/x11/joypad_linux.cpp +++ b/platform/x11/joypad_linux.cpp @@ -125,7 +125,6 @@ void JoypadLinux::enumerate_joypads(udev *p_udev) { enumerate = udev_enumerate_new(p_udev); udev_enumerate_add_match_subsystem(enumerate, "input"); - udev_enumerate_add_match_property(enumerate, "ID_INPUT_JOYPAD", "1"); udev_enumerate_scan_devices(enumerate); devices = udev_enumerate_get_list_entry(enumerate); diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 2b317e7e97..3e8709a11e 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -2145,7 +2145,7 @@ void OS_X11::set_context(int p_context) { } } -PowerState OS_X11::get_power_state() { +OS::PowerState OS_X11::get_power_state() { return power_manager->get_power_state(); } diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index 1373212e37..0e2430c650 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -262,7 +262,7 @@ public: virtual void set_use_vsync(bool p_enable); virtual bool is_vsync_enabled() const; - 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/x11/power_x11.cpp b/platform/x11/power_x11.cpp index 32100354a6..76ff7f91fb 100644 --- a/platform/x11/power_x11.cpp +++ b/platform/x11/power_x11.cpp @@ -252,7 +252,7 @@ bool PowerX11::GetPowerInfo_Linux_proc_acpi() { this->nsecs_left = -1; this->percent_left = -1; - this->power_state = POWERSTATE_UNKNOWN; + this->power_state = OS::POWERSTATE_UNKNOWN; dirp->change_dir(proc_acpi_battery_path); Error err = dirp->list_dir_begin(); @@ -282,13 +282,13 @@ bool PowerX11::GetPowerInfo_Linux_proc_acpi() { } if (!have_battery) { - this->power_state = POWERSTATE_NO_BATTERY; + this->power_state = OS::POWERSTATE_NO_BATTERY; } else if (charging) { - this->power_state = POWERSTATE_CHARGING; + this->power_state = OS::POWERSTATE_CHARGING; } else if (have_ac) { - this->power_state = POWERSTATE_CHARGED; + this->power_state = OS::POWERSTATE_CHARGED; } else { - this->power_state = POWERSTATE_ON_BATTERY; + this->power_state = OS::POWERSTATE_ON_BATTERY; } return true; /* definitive answer. */ @@ -400,17 +400,17 @@ bool PowerX11::GetPowerInfo_Linux_proc_apm() { } if (battery_flag == 0xFF) { /* unknown state */ - this->power_state = POWERSTATE_UNKNOWN; + this->power_state = OS::POWERSTATE_UNKNOWN; } else if (battery_flag & (1 << 7)) { /* no battery */ - this->power_state = POWERSTATE_NO_BATTERY; + this->power_state = OS::POWERSTATE_NO_BATTERY; } else if (battery_flag & (1 << 3)) { /* charging */ - this->power_state = POWERSTATE_CHARGING; + this->power_state = OS::POWERSTATE_CHARGING; need_details = true; } else if (ac_status == 1) { - this->power_state = POWERSTATE_CHARGED; /* on AC, not charging. */ + this->power_state = OS::POWERSTATE_CHARGED; /* on AC, not charging. */ need_details = true; } else { - this->power_state = POWERSTATE_ON_BATTERY; + this->power_state = OS::POWERSTATE_ON_BATTERY; need_details = true; } @@ -445,7 +445,7 @@ bool PowerX11::GetPowerInfo_Linux_sys_class_power_supply(/*PowerState *state, in return false; } - this->power_state = POWERSTATE_NO_BATTERY; /* assume we're just plugged in. */ + this->power_state = OS::POWERSTATE_NO_BATTERY; /* assume we're just plugged in. */ this->nsecs_left = -1; this->percent_left = -1; @@ -454,7 +454,7 @@ bool PowerX11::GetPowerInfo_Linux_sys_class_power_supply(/*PowerState *state, in while (name != "") { bool choose = false; char str[64]; - PowerState st; + OS::PowerState st; int secs; int pct; @@ -475,17 +475,17 @@ bool PowerX11::GetPowerInfo_Linux_sys_class_power_supply(/*PowerState *state, in /* some drivers don't offer this, so if it's not explicitly reported assume it's present. */ if (read_power_file(base, name.utf8().get_data(), "present", str, sizeof(str)) && (String(str) == "0\n")) { - st = POWERSTATE_NO_BATTERY; + st = OS::POWERSTATE_NO_BATTERY; } else if (!read_power_file(base, name.utf8().get_data(), "status", str, sizeof(str))) { - st = POWERSTATE_UNKNOWN; /* uh oh */ + st = OS::POWERSTATE_UNKNOWN; /* uh oh */ } else if (String(str) == "Charging\n") { - st = POWERSTATE_CHARGING; + st = OS::POWERSTATE_CHARGING; } else if (String(str) == "Discharging\n") { - st = POWERSTATE_ON_BATTERY; + st = OS::POWERSTATE_ON_BATTERY; } else if ((String(str) == "Full\n") || (String(str) == "Not charging\n")) { - st = POWERSTATE_CHARGED; + st = OS::POWERSTATE_CHARGED; } else { - st = POWERSTATE_UNKNOWN; /* uh oh */ + st = OS::POWERSTATE_UNKNOWN; /* uh oh */ } if (!read_power_file(base, name.utf8().get_data(), "capacity", str, sizeof(str))) { @@ -543,17 +543,17 @@ bool PowerX11::UpdatePowerInfo() { } PowerX11::PowerX11() - : nsecs_left(-1), percent_left(-1), power_state(POWERSTATE_UNKNOWN) { + : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) { } PowerX11::~PowerX11() { } -PowerState PowerX11::get_power_state() { +OS::PowerState PowerX11::get_power_state() { if (UpdatePowerInfo()) { return power_state; } else { - return POWERSTATE_UNKNOWN; + return OS::POWERSTATE_UNKNOWN; } } diff --git a/platform/x11/power_x11.h b/platform/x11/power_x11.h index e34223036d..7fc258bc0d 100644 --- a/platform/x11/power_x11.h +++ b/platform/x11/power_x11.h @@ -33,14 +33,14 @@ #include "os/dir_access.h" #include "os/file_access.h" -#include "os/power.h" +#include "os/os.h" class PowerX11 { private: int nsecs_left; int percent_left; - PowerState power_state; + OS::PowerState power_state; FileAccessRef open_power_file(const char *base, const char *node, const char *key); bool read_power_file(const char *base, const char *node, const char *key, char *buf, size_t buflen); @@ -58,7 +58,7 @@ public: PowerX11(); virtual ~PowerX11(); - PowerState get_power_state(); + OS::PowerState get_power_state(); int get_power_seconds_left(); int get_power_percent_left(); }; |