mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-16 11:19:18 +01:00
parent
9fae3881ed
commit
95dc49ac77
@ -520,13 +520,9 @@ bool IsLaptop() {
|
||||
}
|
||||
|
||||
return !(status.BatteryFlag & 128); // 128 = no system battery
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
#elif defined(Q_OS_LINUX)
|
||||
return !QDir("/proc/acpi/battery").entryList(QDir::Dirs | QDir::NoDotAndDotDot).isEmpty();
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#elif defined(Q_OS_MAC)
|
||||
ScopedCFTypeRef<CFTypeRef> power_sources(IOPSCopyPowerSourcesInfo());
|
||||
ScopedCFTypeRef<CFArrayRef> power_source_list(
|
||||
IOPSCopyPowerSourcesList(power_sources.get()));
|
||||
@ -540,6 +536,8 @@ bool IsLaptop() {
|
||||
}
|
||||
}
|
||||
return false;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user