From 9dcc9a05effb1123782705b5be76bd8379f4d0c8 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Thu, 4 Jan 2018 18:43:32 +0000 Subject: [PATCH] moonlight: update to moonlight-4d94439 --- packages/addons/script/moonlight/package.mk | 6 +- .../patches/moonlight-upstream-fixes.patch | 182 ------------------ 2 files changed, 3 insertions(+), 185 deletions(-) delete mode 100644 packages/addons/script/moonlight/patches/moonlight-upstream-fixes.patch diff --git a/packages/addons/script/moonlight/package.mk b/packages/addons/script/moonlight/package.mk index 56aa9f8970..c7157af033 100644 --- a/packages/addons/script/moonlight/package.mk +++ b/packages/addons/script/moonlight/package.mk @@ -17,10 +17,10 @@ ################################################################################ PKG_NAME="moonlight" -PKG_VERSION="391de3f" -PKG_SHA256="10aa7613afec0f7035135f67aa9cdcb12b8c444b8f92cf976fd2ceec5865a278" +PKG_VERSION="4d94439" +PKG_SHA256="5190f9c3a0fd17c7c8f0de8c2509f4749a2f399b7dc4d1402dd55c6f351260b2" PKG_VERSION_NUMBER="2.2.2" -PKG_REV="107" +PKG_REV="108" PKG_ARCH="any" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/dead/script.moonlight" diff --git a/packages/addons/script/moonlight/patches/moonlight-upstream-fixes.patch b/packages/addons/script/moonlight/patches/moonlight-upstream-fixes.patch deleted file mode 100644 index bedb048075..0000000000 --- a/packages/addons/script/moonlight/patches/moonlight-upstream-fixes.patch +++ /dev/null @@ -1,182 +0,0 @@ -From 7057b4af0c5921393d7a5c79b798cb923a895e67 Mon Sep 17 00:00:00 2001 -From: HDKiller -Date: Sat, 16 Sep 2017 19:29:42 +0200 -Subject: [PATCH 1/3] make parameteres compatible with moonlight 2.4.3 - ---- - script.moonlight/bin/moonlight.sh | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/script.moonlight/bin/moonlight.sh b/script.moonlight/bin/moonlight.sh -index 967c6e0..e389041 100644 ---- a/script.moonlight/bin/moonlight.sh -+++ b/script.moonlight/bin/moonlight.sh -@@ -4,6 +4,14 @@ - - oe_setup_addon script.moonlight - -+# copy gamecontrollerdb.txt to folder -+MOONLIGHT_CONF_DIR="/storage/.config/moonlight" -+ -+if [ ! -f "$MOONLIGHT_CONF_DIR/gamecontrollerdb.txt" ]; then -+ mkdir -p $MOONLIGHT_CONF_DIR -+ cp $ADDON_DIR/etc/gamecontrollerdb.txt $MOONLIGHT_CONF_DIR -+fi -+ - while [ 1 ]; do - if [ -f $ADDON_DIR/start_moonlight.tmp ]; then - -@@ -30,13 +38,9 @@ while [ 1 ]; do - fi - - if [ "$MOON_FRAMERATE" = "60" ]; then -- MOONLIGHT_ARG="$MOONLIGHT_ARG -60fps" -+ MOONLIGHT_ARG="$MOONLIGHT_ARG -fps 60" - else -- MOONLIGHT_ARG="$MOONLIGHT_ARG -30fps" -- fi -- -- if [ "$MOON_FORCEHW" = "true" ]; then -- MOONLIGHT_ARG="$MOONLIGHT_ARG -forcehw" -+ MOONLIGHT_ARG="$MOONLIGHT_ARG -fps 30" - fi - - if [ "$MOON_SURROUND" = "true" ]; then -@@ -59,10 +63,6 @@ while [ 1 ]; do - MOONLIGHT_ARG="$MOONLIGHT_ARG -audio $MOON_AUDIO" - fi - -- if [ "$MOON_MAPPING" != "" ]; then -- MOONLIGHT_ARG="$MOONLIGHT_ARG -mapping \"${ADDON_DIR}/share/moonlight/mappings/${MOON_MAPPING}.conf\"" -- fi -- - if [ "$MOONLIGHT_APP" != "" ]; then - MOONLIGHT_ARG="$MOONLIGHT_ARG -app \"${MOONLIGHT_APP}\"" - fi -@@ -78,7 +78,7 @@ while [ 1 ]; do - fi - - modprobe snd_bcm2835 || : -- echo $MOONLIGHT_ARG >> $ADDON_LOG_FILE -+ echo "${MOONLIGHT_ARG}" >> ${ADDON_LOG_FILE} - /bin/sh -c "${ADDON_DIR}/bin/moonlight ${MOONLIGHT_ARG} > ${ADDON_LOG_FILE} 2>&1" - rmmod snd_bcm2835 || : - systemctl start kodi - -From c93f573cd46305fc630109faf8be8c5032e9c847 Mon Sep 17 00:00:00 2001 -From: HDKiller -Date: Sun, 17 Sep 2017 07:29:25 +0200 -Subject: [PATCH 2/3] add new parameter (-4k) and remove obsolete ones - (-mapping) since controller config now comes from gamecontrollerdb - ---- - script.moonlight/bin/moonlight.sh | 2 ++ - script.moonlight/resources/settings.xml | 5 ++--- - 2 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/script.moonlight/bin/moonlight.sh b/script.moonlight/bin/moonlight.sh -index e389041..69a5aff 100644 ---- a/script.moonlight/bin/moonlight.sh -+++ b/script.moonlight/bin/moonlight.sh -@@ -33,6 +33,8 @@ while [ 1 ]; do - MOONLIGHT_ARG="$MOONLIGHT_ARG -720" - elif [ "$MOON_RESOLUTION" = "1080p" ]; then - MOONLIGHT_ARG="$MOONLIGHT_ARG -1080" -+ elif [ "$MOON_RESOLUTION" = "4k" ]; then -+ MOONLIGHT_ARG="$MOONLIGHT_ARG -4k" - else - MOONLIGHT_ARG="$MOONLIGHT_ARG -width $MOON_WIDTH_RESOLUTION -height $MOON_HEIGHT_RESOLUTION" - fi -diff --git a/script.moonlight/resources/settings.xml b/script.moonlight/resources/settings.xml -index d035ecd..723d57e 100644 ---- a/script.moonlight/resources/settings.xml -+++ b/script.moonlight/resources/settings.xml -@@ -1,7 +1,7 @@ - - - -- -+ - - - -@@ -13,6 +13,5 @@ - - - -- - -- -\ No newline at end of file -+ - -From f9bb350c1b99e088e16bf67ef547bfadb6dbd1fc Mon Sep 17 00:00:00 2001 -From: Stefan Saraev -Date: Sun, 17 Sep 2017 11:37:41 +0200 -Subject: [PATCH 3/3] Update moonlight embedded wrapper to 2.4.3 - ---- - script.moonlight/addon.xml | 4 ++-- - script.moonlight/lib/moonlight.py | 15 +++++++++++++-- - 2 files changed, 15 insertions(+), 4 deletions(-) - -diff --git a/script.moonlight/addon.xml b/script.moonlight/addon.xml -index 9d53246..d18a813 100644 ---- a/script.moonlight/addon.xml -+++ b/script.moonlight/addon.xml -@@ -1,5 +1,5 @@ -  -- -+ - - - -@@ -16,4 +16,4 @@ - - gustavobenn@hotmail.com - -- -\ No newline at end of file -+ -diff --git a/script.moonlight/lib/moonlight.py b/script.moonlight/lib/moonlight.py -index 7edae39..87065fc 100644 ---- a/script.moonlight/lib/moonlight.py -+++ b/script.moonlight/lib/moonlight.py -@@ -10,6 +10,14 @@ - GS_IO_ERROR = -5 - GS_NOT_SUPPORTED_4K = -6 - -+class DISPLAY_MODE(ctypes.Structure): -+ pass -+ -+DISPLAY_MODE._fields_ = [("height", ctypes.c_int), -+ ("width", ctypes.c_int), -+ ("refresh", ctypes.c_int), -+ ("next", ctypes.POINTER(DISPLAY_MODE))] -+ - class SERVER_INFORMATION(ctypes.Structure): - _fields_ = [("address", ctypes.c_char_p), - ("serverInfoAppVersion", ctypes.c_char_p), -@@ -20,8 +28,11 @@ class SERVER_DATA(ctypes.Structure): - ("gpuType", ctypes.c_char_p), - ("paired", ctypes.c_bool), - ("supports4K", ctypes.c_bool), -+ ("unsupported", ctypes.c_bool), - ("currentGame", ctypes.c_int), - ("serverMajorVersion", ctypes.c_int), -+ ("gsVersion", ctypes.c_char_p), -+ ("modes", DISPLAY_MODE), - ("serverInfo", SERVER_INFORMATION)] - - class APP_LIST(ctypes.Structure): -@@ -37,8 +48,8 @@ class _HTTP_DATA(ctypes.Structure): - - class LibGameStream: - def __init__(self, libpath = ""): -- self.commonlib = ctypes.cdll.LoadLibrary(os.path.join(libpath, "libmoonlight-common.so.0")) -- self.gslib = ctypes.cdll.LoadLibrary(os.path.join(libpath, "libgamestream.so.0")) -+ self.commonlib = ctypes.cdll.LoadLibrary(os.path.join(libpath, "libmoonlight-common.so.2")) -+ self.gslib = ctypes.cdll.LoadLibrary(os.path.join(libpath, "libgamestream.so.2")) - self.connected = False - self.address = "" - self.key_dir = ""