From fbdd70f3a20bfa1a2b55f5a5e976ecd632b4e215 Mon Sep 17 00:00:00 2001 From: koldo Date: Fri, 28 Aug 2015 19:35:54 +0000 Subject: [PATCH] *SysInfo: Solved problems with Xtest git-svn-id: svn://ultimatepp.org/upp/trunk@8861 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- bazaar/SysInfo/SysInfo.upp | 4 +++- bazaar/SysInfo/battery.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bazaar/SysInfo/SysInfo.upp b/bazaar/SysInfo/SysInfo.upp index 132d1cdf9..3499b7a2d 100644 --- a/bazaar/SysInfo/SysInfo.upp +++ b/bazaar/SysInfo/SysInfo.upp @@ -8,7 +8,9 @@ library(WIN32) "ws2_32 psapi gdi32 vfw32 oleaut32 iphlpapi PowrProf netapi32 wbe library(POSIX | LINUX | FREEBSD) X11; -library(!NO_XTEST) Xtst; +library(POSIX | NO_XTEST) ; + +library(POSIX) Xtst; options(MSC) "/D PSAPI_VERSION=1"; diff --git a/bazaar/SysInfo/battery.cpp b/bazaar/SysInfo/battery.cpp index 38ebc449c..cf01b0449 100644 --- a/bazaar/SysInfo/battery.cpp +++ b/bazaar/SysInfo/battery.cpp @@ -27,7 +27,7 @@ bool GetBatteryStatus(bool &discharging, int &percentage, int &remainingMin) remainingMin = Null; */ percentage = 100; - Array files = SearchFile("/proc/acpi/battery", "state"); + Vector files = SearchFile("/proc/acpi/battery", "state"); if (files.GetCount() == 0) return false; StringParse state = LoadFile_Safe(files[0]); @@ -58,7 +58,7 @@ bool GetBatteryStatus(bool &discharging, int &percentage, int &remainingMin) bool GetBatteryInfo(bool &present/*, int &designCapacity, int &lastFullCapacity, String &vendor, String &type, String &model, String &serial*/) { - Array files = SearchFile("/proc/acpi/battery", "info"); + Vector files = SearchFile("/proc/acpi/battery", "info"); if (files.GetCount() == 0) return false; StringParse info = LoadFile_Safe(files[0]);