mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
kodi: add patch to disable unsupported powerfunctions for iMX6 builds
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
f983e02b9a
commit
aa25d20637
@ -0,0 +1,81 @@
|
||||
From fa31c513986f8429f8e8e4b1ca39455769cd0a1c Mon Sep 17 00:00:00 2001
|
||||
From: fritsch <peter.fruehberger@gmail.com>
|
||||
Date: Sat, 13 Dec 2014 18:36:00 +0100
|
||||
Subject: [PATCH] IMX: PowerManager - do nothing besides rebooting
|
||||
|
||||
---
|
||||
xbmc/powermanagement/PowerManager.cpp | 4 +++
|
||||
xbmc/powermanagement/linux/CIMXPowerSyscall.h | 40 +++++++++++++++++++++++++++
|
||||
2 files changed, 44 insertions(+)
|
||||
create mode 100644 xbmc/powermanagement/linux/CIMXPowerSyscall.h
|
||||
|
||||
diff --git a/xbmc/powermanagement/PowerManager.cpp b/xbmc/powermanagement/PowerManager.cpp
|
||||
index 5900f98..f669894 100644
|
||||
--- a/xbmc/powermanagement/PowerManager.cpp
|
||||
+++ b/xbmc/powermanagement/PowerManager.cpp
|
||||
@@ -40,6 +40,8 @@
|
||||
#include "osx/CocoaPowerSyscall.h"
|
||||
#elif defined(TARGET_ANDROID)
|
||||
#include "android/AndroidPowerSyscall.h"
|
||||
+#elif defined(HAS_IMXVPU)
|
||||
+#include "linux/CIMXPowerSyscall.h"
|
||||
#elif defined(TARGET_POSIX)
|
||||
#include "linux/FallbackPowerSyscall.h"
|
||||
#if defined(HAS_DBUS)
|
||||
@@ -73,6 +75,8 @@ void CPowerManager::Initialize()
|
||||
m_instance = new CCocoaPowerSyscall();
|
||||
#elif defined(TARGET_ANDROID)
|
||||
m_instance = new CAndroidPowerSyscall();
|
||||
+#elif defined(HAS_IMXVPU)
|
||||
+ m_instance = new CIMXPowerSyscall();
|
||||
#elif defined(TARGET_POSIX)
|
||||
#if defined(HAS_DBUS)
|
||||
if (CConsoleUPowerSyscall::HasConsoleKitAndUPower())
|
||||
diff --git a/xbmc/powermanagement/linux/CIMXPowerSyscall.h b/xbmc/powermanagement/linux/CIMXPowerSyscall.h
|
||||
new file mode 100644
|
||||
index 0000000..27e644e
|
||||
--- /dev/null
|
||||
+++ b/xbmc/powermanagement/linux/CIMXPowerSyscall.h
|
||||
@@ -0,0 +1,40 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2005-2013 Team XBMC
|
||||
+ * http://xbmc.org
|
||||
+ *
|
||||
+ * This Program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2, or (at your option)
|
||||
+ * any later version.
|
||||
+ *
|
||||
+ * This Program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with XBMC; see the file COPYING. If not, see
|
||||
+ * <http://www.gnu.org/licenses/>.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#pragma once
|
||||
+#include "powermanagement/IPowerSyscall.h"
|
||||
+#include "system.h"
|
||||
+#if defined(TARGET_POSIX)
|
||||
+
|
||||
+class CIMXPowerSyscall : public CPowerSyscallWithoutEvents
|
||||
+{
|
||||
+public:
|
||||
+ virtual bool Powerdown() {return false; }
|
||||
+ virtual bool Suspend() {return false; }
|
||||
+ virtual bool Hibernate() {return false; }
|
||||
+ virtual bool Reboot() {return true; }
|
||||
+
|
||||
+ virtual bool CanPowerdown() {return false; }
|
||||
+ virtual bool CanSuspend() {return false; }
|
||||
+ virtual bool CanHibernate() {return false; }
|
||||
+ virtual bool CanReboot() {return true; }
|
||||
+ virtual int BatteryLevel() {return 0; }
|
||||
+};
|
||||
+#endif
|
||||
--
|
||||
1.9.1
|
Loading…
x
Reference in New Issue
Block a user