mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2024-11-23 00:09:52 +00:00
Cleanups, More LibreELEC Stuff, more permission fixes, Misc switch stuff. (#1930)
* libCEC: Update to 6.0.2
* L4T: Switch-bsp: Fix typos
* Switch: Fix all permission issues with running kodi as a non-root user.
* L4T: Switch: Minor code cleanups
* Add upower and libgudev so kodi can get battery stats
Upower was removed from libreELEC in 2013 with this commit: 3a130cd500
This was a stupid choice as it is the only option in kodi for supplying any battery statitistics. Currently broken.
This patchset: https://github.com/xbmc/xbmc/pull/17327/commits for kodi seemingliy wants to fix the issue(Doesnt, is more of a new way to deal with dbus in general), but will still require that upower be available for battery.
* Switch: LibreELEC: Peripheral.Joystick: Fix Add Patches from PR's upstream to fix issues with udev devices
* Switch: LibreElec: Peripheral.Joystick: Add Nintendo Switch udev joystick mappings
* Switch: LibreELEC: Peripheral.Joystick: Force Udev controller driver as default.
This commit is contained in:
parent
ed7edc5d2f
commit
6fb5ad6fee
@ -3,8 +3,8 @@
|
||||
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="libcec"
|
||||
PKG_VERSION="4.0.7"
|
||||
PKG_SHA256="bcd92c376993a5721d346edcc09eb17289451f9156b1d1d113c9663c2046315a"
|
||||
PKG_VERSION="6.0.2"
|
||||
PKG_SHA256="090696d7a4fb772d7acebbb06f91ab92e025531c7c91824046b9e4e71ecb3377"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://libcec.pulse-eight.com/"
|
||||
PKG_URL="https://github.com/Pulse-Eight/libcec/archive/libcec-${PKG_VERSION}.tar.gz"
|
||||
|
@ -18,3 +18,10 @@ PKG_BUILD_FLAGS="+lto"
|
||||
|
||||
PKG_IS_ADDON="embedded"
|
||||
PKG_ADDON_TYPE="kodi.peripheral"
|
||||
|
||||
post_install() {
|
||||
if [ "${PROJECT}" = "L4T" -a "${DEVICE}" = "Switch" ]; then
|
||||
# Set UDEV controller driver as active
|
||||
sed -i -e 's|<default>0</default>|<default>1</default>|' ${INSTALL}/usr/share/kodi/addons/peripheral.joystick/resources/settings.xml
|
||||
fi
|
||||
}
|
||||
|
@ -9,6 +9,15 @@ PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.kodi.tv"
|
||||
PKG_URL="https://github.com/xbmc/xbmc/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain JsonSchemaBuilder:host TexturePacker:host Python3 zlib systemd lzo pcre swig:host libass curl fontconfig fribidi tinyxml libjpeg-turbo freetype libcdio taglib libxml2 libxslt rapidjson sqlite ffmpeg crossguid libdvdnav libfmt lirc libfstrcmp flatbuffers:host flatbuffers libudfread spdlog"
|
||||
|
||||
if [ ${PROJECT} = "L4T" -a ${DEVICE} = "Switch" ]; then
|
||||
#Not really sure why u-power was removed, this is required
|
||||
#to get battery statistics in kodi.
|
||||
PKG_DEPENDS_TARGET+=" upower"
|
||||
fi
|
||||
|
||||
PKG_DEPENDS_UNPACK="commons-lang3 commons-text groovy"
|
||||
|
||||
PKG_DEPENDS_HOST="toolchain"
|
||||
PKG_LONGDESC="A free and open source cross-platform media player."
|
||||
PKG_BUILD_FLAGS="+speed"
|
||||
|
@ -49,7 +49,7 @@ pre_configure_target() {
|
||||
# bluez fails to build in subdirs
|
||||
cd ${PKG_BUILD}
|
||||
rm -rf .${TARGET_NAME}
|
||||
|
||||
sed -i -e "s|<policy user=\"%DISTRO%\">|<policy user=\"${DISTRO}\">|" src/bluetooth.conf
|
||||
export LIBS="-lncurses"
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,38 @@
|
||||
diff -Naur bluez-5.66/src/bluetooth.conf bluez-5.66-2/src/bluetooth.conf
|
||||
--- bluez-5.66/src/bluetooth.conf 2024-02-02 04:33:35.200222390 +0100
|
||||
+++ bluez-5.66-2/src/bluetooth.conf 2024-02-02 04:35:47.442699056 +0100
|
||||
@@ -6,6 +6,34 @@
|
||||
<busconfig>
|
||||
|
||||
<!-- ../system.conf have denied everything, so we just punch some holes -->
|
||||
+ <policy user="%DISTRO%">
|
||||
+ <allow own="org.bluez"/>
|
||||
+ <allow send_destination="org.bluez"/>
|
||||
+ <allow send_interface="org.bluez.AdvertisementMonitor1"/>
|
||||
+ <allow send_interface="org.bluez.Agent1"/>
|
||||
+ <allow send_interface="org.bluez.MediaEndpoint1"/>
|
||||
+ <allow send_interface="org.bluez.MediaPlayer1"/>
|
||||
+ <allow send_interface="org.bluez.Profile1"/>
|
||||
+ <allow send_interface="org.bluez.GattCharacteristic1"/>
|
||||
+ <allow send_interface="org.bluez.GattDescriptor1"/>
|
||||
+ <allow send_interface="org.bluez.LEAdvertisement1"/>
|
||||
+ <allow send_interface="org.freedesktop.DBus.ObjectManager"/>
|
||||
+ <allow send_interface="org.freedesktop.DBus.Properties"/>
|
||||
+ <allow send_interface="org.mpris.MediaPlayer2.Player"/>
|
||||
+
|
||||
+ <allow own="org.bluez.obex"/>
|
||||
+ <allow send_destination="org.bluez.obex"/>
|
||||
+ <allow send_interface="org.bluez.obex.Agent1"/>
|
||||
+ <allow send_interface="org.bluez.obex.Client1"/>
|
||||
+ <allow send_interface="org.bluez.obex.Session1"/>
|
||||
+ <allow send_interface="org.bluez.obex.Transfer1"/>
|
||||
+ <allow send_interface="org.bluez.obex.ObjectPush1"/>
|
||||
+ <allow send_interface="org.bluez.obex.FileTransfer1"/>
|
||||
+ <allow send_interface="org.bluez.obex.PhonebookAccess1"/>
|
||||
+ <allow send_interface="org.bluez.obex.Synchronization1"/>
|
||||
+ <allow send_interface="org.bluez.obex.MessageAccess1"/>
|
||||
+ <allow send_interface="org.bluez.obex.Message1"/>
|
||||
+ </policy>
|
||||
|
||||
<policy user="root">
|
||||
<allow own="org.bluez"/>
|
@ -68,6 +68,10 @@ PKG_MAKE_OPTS_TARGET="storagedir=/storage/.cache/connman \
|
||||
vpn_storagedir=/storage/.config/wireguard \
|
||||
statedir=/run/connman"
|
||||
|
||||
pre_configure_target() {
|
||||
sed -i -e "s|<policy user=\"%DISTRO%\">|<policy user=\"${DISTRO}\">|" ${PKG_BUILD}/src/connman-dbus.conf
|
||||
}
|
||||
|
||||
post_configure_target() {
|
||||
libtool_remove_rpath libtool
|
||||
}
|
||||
|
@ -0,0 +1,18 @@
|
||||
diff -Naur connman-24180d1243bf005c721be6f9d8d6da67bb669c55/src/connman-dbus.conf connman-24180d1243bf005c721be6f9d8d6da67bb669c55-2/src/connman-dbus.conf
|
||||
--- connman-24180d1243bf005c721be6f9d8d6da67bb669c55/src/connman-dbus.conf 2024-02-02 04:49:53.238565581 +0100
|
||||
+++ connman-24180d1243bf005c721be6f9d8d6da67bb669c55-2/src/connman-dbus.conf 2024-02-02 04:52:06.209049700 +0100
|
||||
@@ -1,6 +1,14 @@
|
||||
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||
<busconfig>
|
||||
+ <policy user="%DISTRO%">
|
||||
+ <allow own="net.connman"/>
|
||||
+ <allow send_destination="net.connman"/>
|
||||
+ <allow send_interface="net.connman.Agent"/>
|
||||
+ <allow send_interface="net.connman.Counter"/>
|
||||
+ <allow send_interface="net.connman.Notification"/>
|
||||
+ </policy>
|
||||
+
|
||||
<policy user="root">
|
||||
<allow own="net.connman"/>
|
||||
<allow send_destination="net.connman"/>
|
@ -40,8 +40,8 @@ post_makeinstall_target() {
|
||||
|
||||
post_install() {
|
||||
add_user dbus x 81 81 "System message bus" "/" "/bin/sh"
|
||||
add_group dbus 81
|
||||
add_group netdev 497
|
||||
add_group dbus 81 ${DISTRO}
|
||||
add_group netdev 497 ${DISTRO}
|
||||
|
||||
echo "chmod 4750 ${INSTALL}/usr/lib/dbus/dbus-daemon-launch-helper" >> ${FAKEROOT_SCRIPT}
|
||||
echo "chown 0:81 ${INSTALL}/usr/lib/dbus/dbus-daemon-launch-helper" >> ${FAKEROOT_SCRIPT}
|
||||
|
17
packages/sysutils/libgudev/package.mk
Normal file
17
packages/sysutils/libgudev/package.mk
Normal file
@ -0,0 +1,17 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="libgudev"
|
||||
PKG_VERSION="235"
|
||||
PKG_SHA256="36360e7629b762b0cc85ef302b88a7cea96b0156fd426274815b155c83732c59"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.linux-usb.org/"
|
||||
PKG_URL="https://github.com/GNOME/libgudev/archive/refs/tags/${PKG_VERSION}.zip"
|
||||
PKG_DEPENDS_TARGET="toolchain systemd"
|
||||
|
||||
|
||||
post_makeinstall_target() {
|
||||
rm -rf ${INSTALL}/usr/lib/pkgconfig
|
||||
rm -rf ${INSTALL}/usr/include
|
||||
}
|
23
packages/sysutils/upower/package.mk
Normal file
23
packages/sysutils/upower/package.mk
Normal file
@ -0,0 +1,23 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="upower"
|
||||
PKG_VERSION="v1.90.0"
|
||||
PKG_SHA256="cb6028f095824422c59d98b3c9903e2eda2a96fc613f11824f0b6379de7efa2e"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.linux-usb.org/"
|
||||
PKG_URL="https://gitlab.freedesktop.org/upower/upower/-/archive/${PKG_VERSION}/upower-${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain systemd glib dbus libusb libgudev"
|
||||
PKG_LONGDESC="Upower is a modular hardware abstraction layer designed for use in Linux systems that is designed to simplify device management and replace the current monolithic Linux HAL. Upower includes the ability to enumerate system devices and send notifications when hardware is added or removed from the computer system."
|
||||
|
||||
PKG_MESON_OPTS_TARGET="-Dgtk-doc=false -Dman=false"
|
||||
|
||||
post_makeinstall_target() {
|
||||
rm -rf ${INSTALL}/usr/lib/pkgconfig
|
||||
rm -rf ${INSTALL}/usr/include
|
||||
}
|
||||
|
||||
post_install() {
|
||||
enable_service upower.service
|
||||
}
|
@ -11,12 +11,15 @@ case ${TARGET_ARCH} in
|
||||
;;
|
||||
esac
|
||||
|
||||
# CEC Support
|
||||
CEC_FRAMEWORK_SUPPORT="yes"
|
||||
|
||||
if [ "${DISTRO}" = "Lakka" ]; then
|
||||
DISTRO_PATH="lakka"
|
||||
DISTRO_ICON="icon_lakka_hue.bmp"
|
||||
HEKATE_SPLASH="splash_lakka.bmp"
|
||||
ID="SWR-LAK"
|
||||
ADDITIONAL_PACKAGES+=" mergerfs wii-u-gc-adapter"
|
||||
ADDITIONAL_PACKAGES+=" wii-u-gc-adapter"
|
||||
# LAKKA_CANARY_PATH="http://nightly.builds.lakka.tv/members/gavin/lakka-v5.x-new"
|
||||
elif [ "${DISTRO}" = "LibreELEC" ]; then
|
||||
DISTRO_PATH="libreelec"
|
||||
@ -27,7 +30,7 @@ else
|
||||
echo "Unknown distro, expect issues"
|
||||
fi
|
||||
|
||||
ADDITIONAL_PACKAGES+=" switch-bsp v4l-utils"
|
||||
ADDITIONAL_PACKAGES+=" switch-bsp"
|
||||
|
||||
#Remove since we include driver in kernel now. Module Config/udev rules
|
||||
#Included in switch-bsp package, to match version in kernel(0.9.5).
|
||||
|
@ -5,6 +5,8 @@ Requires=graphical.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
User=LibreELEC
|
||||
Group=LibreELEC
|
||||
Environment=HOME=/storage DISPLAY=:0 PULSE_SERVER=127.0.0.1
|
||||
EnvironmentFile=/usr/lib/kodi/kodi.conf
|
||||
EnvironmentFile=-/run/libreelec/kodi.conf
|
||||
|
@ -5,8 +5,8 @@ PKG_DEPENDS_TARGET="joycond rewritefs xdotool alsa-lib alsa-ucm-conf usb-gadget-
|
||||
PKG_SECTION="virtual"
|
||||
PKG_LONGDESC="LibreELEC Nintendo Switch Board Support"
|
||||
|
||||
if [ ! ${PROJECT} = "LibreELEC" ]; then
|
||||
PKG_DEPENDS_TARGET="v4l-utils" # We use this for CEC in lakka, in libreELEC kodi handles that via libCEC.
|
||||
if [ ! "${DISTRO}" = "LibreELEC" ]; then
|
||||
PKG_DEPENDS_TARGET+=" mergerfs v4l-utils" # We use this for CEC in lakka, in libreELEC kodi handles that via libCEC.
|
||||
fi
|
||||
|
||||
post_install() {
|
||||
|
@ -0,0 +1,48 @@
|
||||
From 082e1d3d2004a6bf61009647597d6f1cabac79d5 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Adenis-Lamarre <nicolas.adenis.lamarre@gmail.com>
|
||||
Date: Mon, 24 Oct 2022 12:59:58 +0000
|
||||
Subject: [PATCH] use real vendor/product id
|
||||
|
||||
the current way doesn't provide the real vendor/produc ids
|
||||
that can be found via evtest.
|
||||
This patch applies the same commands from the evtest source code.
|
||||
It works for any pad, including bluetooth pads.
|
||||
|
||||
This patch was originally written for the batocera project at:
|
||||
https://github.com/batocera-linux/batocera.linux/tree/master/board/batocera/patches/kodi-peripheral-joystick
|
||||
|
||||
Signed-off-by: Nicolas Adenis-Lamarre <nicolas.adenis.lamarre@gmail.com>
|
||||
---
|
||||
src/api/udev/JoystickUdev.cpp | 19 ++++++++++---------
|
||||
1 file changed, 10 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/api/udev/JoystickUdev.cpp b/src/api/udev/JoystickUdev.cpp
|
||||
index 3c0c6113..2ef41a2b 100644
|
||||
--- a/src/api/udev/JoystickUdev.cpp
|
||||
+++ b/src/api/udev/JoystickUdev.cpp
|
||||
@@ -275,15 +275,16 @@ bool CJoystickUdev::GetProperties()
|
||||
}
|
||||
SetName(name);
|
||||
|
||||
- // Don't worry about unref'ing the parent
|
||||
- struct udev_device* parent = udev_device_get_parent_with_subsystem_devtype(m_dev, "usb", "usb_device");
|
||||
-
|
||||
- const char* buf;
|
||||
- if ((buf = udev_device_get_sysattr_value(parent, "idVendor")) != nullptr)
|
||||
- SetVendorID(strtol(buf, NULL, 16));
|
||||
-
|
||||
- if ((buf = udev_device_get_sysattr_value(parent, "idProduct")) != nullptr)
|
||||
- SetProductID(strtol(buf, NULL, 16));
|
||||
+ unsigned short id[4];
|
||||
+ char val[16];
|
||||
+ if(ioctl(m_fd, EVIOCGID, id) == 0) {
|
||||
+ sprintf(val, "%x", id[ID_VENDOR]);
|
||||
+ SetVendorID(strtol(val, NULL, 16));
|
||||
+ esyslog("joystick information vendorid=%s for %s", val, m_path.c_str());
|
||||
+ sprintf(val, "%x", id[ID_PRODUCT]);
|
||||
+ SetProductID(strtol(val, NULL, 16));
|
||||
+ esyslog("joystick information productid=%s for %s", val, m_path.c_str());
|
||||
+ }
|
||||
|
||||
struct stat st;
|
||||
if (fstat(m_fd, &st) < 0)
|
@ -0,0 +1,36 @@
|
||||
From 3f76122bbe2ec31b75c78558ca8dca84d042ca12 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Adenis-Lamarre <nicolas.adenis.lamarre@gmail.com>
|
||||
Date: Wed, 28 Jun 2023 05:18:19 +0000
|
||||
Subject: [PATCH] fix axis when not aligned on 0
|
||||
|
||||
Signed-off-by: Nicolas Adenis-Lamarre <nicolas.adenis.lamarre@gmail.com>
|
||||
---
|
||||
src/api/udev/JoystickUdev.cpp | 15 +++++++++++----
|
||||
1 file changed, 11 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/api/udev/JoystickUdev.cpp b/src/api/udev/JoystickUdev.cpp
|
||||
index 3c0c6113..ce088156 100644
|
||||
--- a/src/api/udev/JoystickUdev.cpp
|
||||
+++ b/src/api/udev/JoystickUdev.cpp
|
||||
@@ -217,10 +217,17 @@ bool CJoystickUdev::ScanEvents(void)
|
||||
const unsigned int axisIndex = it->second.axisIndex;
|
||||
const input_absinfo& info = it->second.axisInfo;
|
||||
|
||||
- if (event.value >= 0)
|
||||
- SetAxisValue(axisIndex, event.value, info.maximum);
|
||||
- else
|
||||
- SetAxisValue(axisIndex, event.value, -info.minimum);
|
||||
+ int middle = (info.minimum+info.maximum)/2;
|
||||
+ int length = (info.maximum-info.minimum)/2;
|
||||
+
|
||||
+ if (event.value >= middle && event.value-middle > length/2) {
|
||||
+ SetAxisValue(axisIndex, event.value-middle, length);
|
||||
+ }
|
||||
+ else if (event.value <= middle && middle-event.value > length/2) {
|
||||
+ SetAxisValue(axisIndex, -(middle-event.value), length);
|
||||
+ } else {
|
||||
+ SetAxisValue(axisIndex, 0, length);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
break;
|
@ -0,0 +1,28 @@
|
||||
From 84f6cf46bb84cd47469bb098bd9fd82a3bb93861 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Adenis-Lamarre <nicolas.adenis.lamarre@gmail.com>
|
||||
Date: Wed, 28 Jun 2023 05:21:35 +0000
|
||||
Subject: [PATCH] count correctly all buttons even if not mapped
|
||||
|
||||
Signed-off-by: Nicolas Adenis-Lamarre <nicolas.adenis.lamarre@gmail.com>
|
||||
---
|
||||
src/api/udev/JoystickUdev.cpp | 7 +------
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/api/udev/JoystickUdev.cpp b/src/api/udev/JoystickUdev.cpp
|
||||
index 3c0c6113..ed6d7747 100644
|
||||
--- a/src/api/udev/JoystickUdev.cpp
|
||||
+++ b/src/api/udev/JoystickUdev.cpp
|
||||
@@ -303,12 +303,7 @@ bool CJoystickUdev::GetProperties()
|
||||
// Go through all possible keycodes, check if they are used, and map them to
|
||||
// button/axes/hat indices
|
||||
unsigned int buttons = 0;
|
||||
- for (unsigned int i = KEY_UP; i <= KEY_DOWN; i++)
|
||||
- {
|
||||
- if (test_bit(i, keybit))
|
||||
- m_button_bind[i] = buttons++;
|
||||
- }
|
||||
- for (unsigned int i = BTN_MISC; i < KEY_MAX; i++)
|
||||
+ for (unsigned int i = 0; i < KEY_MAX; i++)
|
||||
{
|
||||
if (test_bit(i, keybit))
|
||||
m_button_bind[i] = buttons++;
|
@ -0,0 +1,46 @@
|
||||
From a408321154d45342a42f4b54e44af7676b4c4933 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Adenis-Lamarre <nicolas.adenis.lamarre@gmail.com>
|
||||
Date: Wed, 28 Jun 2023 05:23:16 +0000
|
||||
Subject: [PATCH] close correctly the uninitialized joysticks
|
||||
|
||||
without that closing, the number of open files is growing (can be observed via lsof | grep kodi | grep /dev)
|
||||
and ends to crash kodi after a long time
|
||||
|
||||
Signed-off-by: Nicolas Adenis-Lamarre <nicolas.adenis.lamarre@gmail.com>
|
||||
---
|
||||
src/api/udev/JoystickInterfaceUdev.cpp | 9 +++++++--
|
||||
src/api/udev/JoystickUdev.h | 1 +
|
||||
2 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/api/udev/JoystickInterfaceUdev.cpp b/src/api/udev/JoystickInterfaceUdev.cpp
|
||||
index 8ee6dfa3..0459927c 100644
|
||||
--- a/src/api/udev/JoystickInterfaceUdev.cpp
|
||||
+++ b/src/api/udev/JoystickInterfaceUdev.cpp
|
||||
@@ -92,8 +92,13 @@ bool CJoystickInterfaceUdev::ScanForJoysticks(JoystickVector& joysticks)
|
||||
|
||||
if (devnode != nullptr)
|
||||
{
|
||||
- JoystickPtr joystick = JoystickPtr(new CJoystickUdev(dev, devnode));
|
||||
- joysticks.push_back(joystick);
|
||||
+ CJoystickUdev *j = new CJoystickUdev(dev, devnode);
|
||||
+ if(j->isInitialized()) {
|
||||
+ JoystickPtr joystick = JoystickPtr(j);
|
||||
+ joysticks.push_back(joystick);
|
||||
+ } else {
|
||||
+ delete j;
|
||||
+ }
|
||||
}
|
||||
|
||||
udev_device_unref(dev);
|
||||
diff --git a/src/api/udev/JoystickUdev.h b/src/api/udev/JoystickUdev.h
|
||||
index 6ce5740f..949d2f27 100644
|
||||
--- a/src/api/udev/JoystickUdev.h
|
||||
+++ b/src/api/udev/JoystickUdev.h
|
||||
@@ -58,6 +58,7 @@ namespace JOYSTICK
|
||||
virtual bool Initialize(void) override;
|
||||
virtual void Deinitialize(void) override;
|
||||
virtual void ProcessEvents(void) override;
|
||||
+ bool isInitialized() { return m_bInitialized; }
|
||||
|
||||
protected:
|
||||
// implementation of CJoystick
|
@ -0,0 +1,214 @@
|
||||
diff -Naur peripheral.joystick-21.1.10-Omega/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Combined_Joy-Cons_V057E_P2008_18b_4a.xml peripheral.joystick-21.1.10-Omega-2/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Combined_Joy-Cons_V057E_P2008_18b_4a.xml
|
||||
--- peripheral.joystick-21.1.10-Omega/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Combined_Joy-Cons_V057E_P2008_18b_4a.xml 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ peripheral.joystick-21.1.10-Omega-2/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Combined_Joy-Cons_V057E_P2008_18b_4a.xml 2024-02-04 18:58:05.396501380 +0100
|
||||
@@ -0,0 +1,37 @@
|
||||
+<?xml version="1.0" ?>
|
||||
+<buttonmap>
|
||||
+ <device name="Nintendo Switch Combined Joy-Cons" provider="udev" vid="057E" pid="2008" buttoncount="18" axiscount="4">
|
||||
+ <configuration />
|
||||
+ <controller id="game.controller.default">
|
||||
+ <feature name="a" button="1" />
|
||||
+ <feature name="b" button="0" />
|
||||
+ <feature name="back" button="9" />
|
||||
+ <feature name="down" button="15" />
|
||||
+ <feature name="guide" button="11" />
|
||||
+ <feature name="left" button="16" />
|
||||
+ <feature name="leftbumper" button="5" />
|
||||
+ <feature name="leftstick">
|
||||
+ <up axis="-1" />
|
||||
+ <down axis="+1" />
|
||||
+ <right axis="+0" />
|
||||
+ <left axis="-0" />
|
||||
+ </feature>
|
||||
+ <feature name="leftthumb" button="12" />
|
||||
+ <feature name="lefttrigger" button="7" />
|
||||
+ <feature name="right" button="17" />
|
||||
+ <feature name="rightbumper" button="6" />
|
||||
+ <feature name="rightstick">
|
||||
+ <up axis="-3" />
|
||||
+ <down axis="+3" />
|
||||
+ <right axis="+2" />
|
||||
+ <left axis="-2" />
|
||||
+ </feature>
|
||||
+ <feature name="rightthumb" button="13" />
|
||||
+ <feature name="righttrigger" button="8" />
|
||||
+ <feature name="start" button="10" />
|
||||
+ <feature name="up" button="14" />
|
||||
+ <feature name="x" button="2" />
|
||||
+ <feature name="y" button="3" />
|
||||
+ </controller>
|
||||
+ </device>
|
||||
+</buttonmap>
|
||||
diff -Naur peripheral.joystick-21.1.10-Omega/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Combined_Joy-Cons_V057E_P2008_22b_4a.xml peripheral.joystick-21.1.10-Omega-2/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Combined_Joy-Cons_V057E_P2008_22b_4a.xml
|
||||
--- peripheral.joystick-21.1.10-Omega/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Combined_Joy-Cons_V057E_P2008_22b_4a.xml 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ peripheral.joystick-21.1.10-Omega-2/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Combined_Joy-Cons_V057E_P2008_22b_4a.xml 2024-02-04 19:18:42.955765642 +0100
|
||||
@@ -0,0 +1,37 @@
|
||||
+<?xml version="1.0" ?>
|
||||
+<buttonmap>
|
||||
+ <device name="Nintendo Switch Combined Joy-Cons" provider="udev" vid="057E" pid="2008" buttoncount="22" axiscount="4">
|
||||
+ <configuration />
|
||||
+ <controller id="game.controller.default">
|
||||
+ <feature name="a" button="1" />
|
||||
+ <feature name="b" button="0" />
|
||||
+ <feature name="back" button="9" />
|
||||
+ <feature name="down" button="15" />
|
||||
+ <feature name="guide" button="11" />
|
||||
+ <feature name="left" button="16" />
|
||||
+ <feature name="leftbumper" button="5" />
|
||||
+ <feature name="leftstick">
|
||||
+ <up axis="-1" />
|
||||
+ <down axis="+1" />
|
||||
+ <right axis="+0" />
|
||||
+ <left axis="-0" />
|
||||
+ </feature>
|
||||
+ <feature name="leftthumb" button="12" />
|
||||
+ <feature name="lefttrigger" button="7" />
|
||||
+ <feature name="right" button="17" />
|
||||
+ <feature name="rightbumper" button="6" />
|
||||
+ <feature name="rightstick">
|
||||
+ <up axis="-3" />
|
||||
+ <down axis="+3" />
|
||||
+ <right axis="+2" />
|
||||
+ <left axis="-2" />
|
||||
+ </feature>
|
||||
+ <feature name="rightthumb" button="13" />
|
||||
+ <feature name="righttrigger" button="8" />
|
||||
+ <feature name="start" button="10" />
|
||||
+ <feature name="up" button="14" />
|
||||
+ <feature name="x" button="2" />
|
||||
+ <feature name="y" button="3" />
|
||||
+ </controller>
|
||||
+ </device>
|
||||
+</buttonmap>
|
||||
diff -Naur peripheral.joystick-21.1.10-Omega/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Left_Joy-Con_V057E_P2006_11b_2a.xml peripheral.joystick-21.1.10-Omega-2/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Left_Joy-Con_V057E_P2006_11b_2a.xml
|
||||
--- peripheral.joystick-21.1.10-Omega/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Left_Joy-Con_V057E_P2006_11b_2a.xml 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ peripheral.joystick-21.1.10-Omega-2/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Left_Joy-Con_V057E_P2006_11b_2a.xml 2024-02-04 07:32:57.729631786 +0100
|
||||
@@ -0,0 +1,21 @@
|
||||
+<?xml version="1.0" ?>
|
||||
+<buttonmap>
|
||||
+ <device name="Nintendo Switch Left Joy-Con" provider="udev" vid="057E" pid="2006" buttoncount="11" axiscount="2">
|
||||
+ <configuration />
|
||||
+ <controller id="game.controller.default">
|
||||
+ <feature name="a" button="8" />
|
||||
+ <feature name="b" button="9" />
|
||||
+ <feature name="back" button="5" />
|
||||
+ <feature name="down" axis="-0" />
|
||||
+ <feature name="guide" button="6" />
|
||||
+ <feature name="left" axis="-1" />
|
||||
+ <feature name="leftbumper" button="2" />
|
||||
+ <feature name="right" axis="+1" />
|
||||
+ <feature name="rightbumper" button="4" />
|
||||
+ <feature name="start" button="0" />
|
||||
+ <feature name="up" axis="+0" />
|
||||
+ <feature name="x" button="10" />
|
||||
+ <feature name="y" button="7" />
|
||||
+ </controller>
|
||||
+ </device>
|
||||
+</buttonmap>
|
||||
diff -Naur peripheral.joystick-21.1.10-Omega/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Lite_Gamepad_V057E_PF123_18b_4a.xml peripheral.joystick-21.1.10-Omega-2/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Lite_Gamepad_V057E_PF123_18b_4a.xml
|
||||
--- peripheral.joystick-21.1.10-Omega/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Lite_Gamepad_V057E_PF123_18b_4a.xml 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ peripheral.joystick-21.1.10-Omega-2/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Lite_Gamepad_V057E_PF123_18b_4a.xml 2024-02-04 18:59:57.934616823 +0100
|
||||
@@ -0,0 +1,37 @@
|
||||
+<?xml version="1.0" ?>
|
||||
+<buttonmap>
|
||||
+ <device name="Nintendo Switch Lite Gamepad" provider="udev" vid="057E" pid="F123" buttoncount="18" axiscount="4">
|
||||
+ <configuration />
|
||||
+ <controller id="game.controller.default">
|
||||
+ <feature name="a" button="1" />
|
||||
+ <feature name="b" button="0" />
|
||||
+ <feature name="back" button="9" />
|
||||
+ <feature name="down" button="15" />
|
||||
+ <feature name="guide" button="11" />
|
||||
+ <feature name="left" button="16" />
|
||||
+ <feature name="leftbumper" button="5" />
|
||||
+ <feature name="leftstick">
|
||||
+ <up axis="-1" />
|
||||
+ <down axis="+1" />
|
||||
+ <right axis="+0" />
|
||||
+ <left axis="-0" />
|
||||
+ </feature>
|
||||
+ <feature name="leftthumb" button="12" />
|
||||
+ <feature name="lefttrigger" button="7" />
|
||||
+ <feature name="right" button="17" />
|
||||
+ <feature name="rightbumper" button="6" />
|
||||
+ <feature name="rightstick">
|
||||
+ <up axis="-3" />
|
||||
+ <down axis="+3" />
|
||||
+ <right axis="+2" />
|
||||
+ <left axis="-2" />
|
||||
+ </feature>
|
||||
+ <feature name="rightthumb" button="13" />
|
||||
+ <feature name="righttrigger" button="8" />
|
||||
+ <feature name="start" button="10" />
|
||||
+ <feature name="up" button="14" />
|
||||
+ <feature name="x" button="2" />
|
||||
+ <feature name="y" button="3" />
|
||||
+ </controller>
|
||||
+ </device>
|
||||
+</buttonmap>
|
||||
diff -Naur peripheral.joystick-21.1.10-Omega/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Pro_Controller_V057E_P2009_18b_4a.xml peripheral.joystick-21.1.10-Omega-2/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Pro_Controller_V057E_P2009_18b_4a.xml
|
||||
--- peripheral.joystick-21.1.10-Omega/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Pro_Controller_V057E_P2009_18b_4a.xml 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ peripheral.joystick-21.1.10-Omega-2/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Pro_Controller_V057E_P2009_18b_4a.xml 2024-02-04 19:01:34.232427026 +0100
|
||||
@@ -0,0 +1,37 @@
|
||||
+<?xml version="1.0" ?>
|
||||
+<buttonmap>
|
||||
+ <device name="Nintendo Switch Pro Controller" provider="udev" vid="057E" pid="2009" buttoncount="18" axiscount="4">
|
||||
+ <configuration />
|
||||
+ <controller id="game.controller.default">
|
||||
+ <feature name="a" button="1" />
|
||||
+ <feature name="b" button="0" />
|
||||
+ <feature name="back" button="9" />
|
||||
+ <feature name="down" button="15" />
|
||||
+ <feature name="guide" button="11" />
|
||||
+ <feature name="left" button="16" />
|
||||
+ <feature name="leftbumper" button="5" />
|
||||
+ <feature name="leftstick">
|
||||
+ <up axis="-1" />
|
||||
+ <down axis="+1" />
|
||||
+ <right axis="+0" />
|
||||
+ <left axis="-0" />
|
||||
+ </feature>
|
||||
+ <feature name="leftthumb" button="12" />
|
||||
+ <feature name="lefttrigger" button="7" />
|
||||
+ <feature name="right" button="17" />
|
||||
+ <feature name="rightbumper" button="6" />
|
||||
+ <feature name="rightstick">
|
||||
+ <up axis="-3" />
|
||||
+ <down axis="+3" />
|
||||
+ <right axis="+2" />
|
||||
+ <left axis="-2" />
|
||||
+ </feature>
|
||||
+ <feature name="rightthumb" button="13" />
|
||||
+ <feature name="righttrigger" button="8" />
|
||||
+ <feature name="start" button="10" />
|
||||
+ <feature name="up" button="14" />
|
||||
+ <feature name="x" button="2" />
|
||||
+ <feature name="y" button="3" />
|
||||
+ </controller>
|
||||
+ </device>
|
||||
+</buttonmap>
|
||||
diff -Naur peripheral.joystick-21.1.10-Omega/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Right_Joy-Con_V057E_P2007_11b_2a.xml peripheral.joystick-21.1.10-Omega-2/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Right_Joy-Con_V057E_P2007_11b_2a.xml
|
||||
--- peripheral.joystick-21.1.10-Omega/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Right_Joy-Con_V057E_P2007_11b_2a.xml 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ peripheral.joystick-21.1.10-Omega-2/peripheral.joystick/resources/buttonmaps/xml/udev/Nintendo_Switch_Right_Joy-Con_V057E_P2007_11b_2a.xml 2024-02-04 07:32:57.729631786 +0100
|
||||
@@ -0,0 +1,21 @@
|
||||
+<?xml version="1.0" ?>
|
||||
+<buttonmap>
|
||||
+ <device name="Nintendo Switch Right Joy-Con" provider="udev" vid="057E" pid="2007" buttoncount="11" axiscount="2">
|
||||
+ <configuration />
|
||||
+ <controller id="game.controller.default">
|
||||
+ <feature name="a" button="2" />
|
||||
+ <feature name="b" button="1" />
|
||||
+ <feature name="back" button="9" />
|
||||
+ <feature name="down" axis="+0" />
|
||||
+ <feature name="guide" button="10" />
|
||||
+ <feature name="left" axis="+1" />
|
||||
+ <feature name="leftbumper" button="4" />
|
||||
+ <feature name="right" axis="-1" />
|
||||
+ <feature name="rightbumper" button="6" />
|
||||
+ <feature name="start" button="8" />
|
||||
+ <feature name="up" axis="-0" />
|
||||
+ <feature name="x" button="3" />
|
||||
+ <feature name="y" button="0" />
|
||||
+ </controller>
|
||||
+ </device>
|
||||
+</buttonmap>
|
@ -108,7 +108,7 @@
|
||||
LINUX="L4T"
|
||||
|
||||
# CEC Support
|
||||
CEC_FRAMEWORK_SUPPORT="yes"
|
||||
CEC_FRAMEWORK_SUPPORT="no"
|
||||
|
||||
# Set Distro Specific options
|
||||
if [ "${DISTRO}" = "LibreELEC" ]; then
|
||||
|
@ -24,7 +24,7 @@
|
||||
/usr/bin/busybox mount -t proc proc /proc
|
||||
/usr/bin/busybox mount -t sysfs sysfs /sys
|
||||
# /run options have to match what systemd uses by default
|
||||
/usr/bin/busybox mount -t tmpfs -o mode=755,size=20%,nr_inodes=800k,nosuid,nodev,strictatime tmpfs /run
|
||||
/usr/bin/busybox mount -t tmpfs -o mode=777,size=20%,nr_inodes=800k,nosuid,nodev,strictatime tmpfs /run
|
||||
|
||||
UPDATE_ROOT=/storage/.update
|
||||
UPDATE_DIR="$UPDATE_ROOT"
|
||||
|
Loading…
Reference in New Issue
Block a user