From nobody Sat Jul 20 17:38:28 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WRDKd1QlXz5S26R; Sat, 20 Jul 2024 17:38:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WRDKd0y2Vz4cbM; Sat, 20 Jul 2024 17:38:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721497109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SSOROpkJQXpGsPOchee0aqOeX6Qy6iBk1f4DUShWm1w=; b=Fv/fqHeItCNlME4GxsrvWrH5ETgiWKmpAYyg9Zm3ddvEjcSdCGzjz3Nvj9O/zogbRIiF+0 +vTVL8h35em92C64acMjji7yGDqVjAeXHsAZmDyzFSJssnjrE/52A86snTIx/rzf2+yAQ1 +9yAUJy/gu+uoEYM+s+DZRCDraPec5HJIKSY0wdcYIw+9ujkOCJlRSu6Dqc8j5NUPpfGfQ 3/igg4uy03CsEcphoVWZovzu28HYFsPjnTP+gxGq4CQXaMXBvWGUhwY5zB+Lw6znisTFzg o85/7C8h6zBG3cz/R47nrZb7KLLP6F6K+CKKMKOuwu9DNu6fN1kJ27kfNqJV0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721497109; a=rsa-sha256; cv=none; b=BhcpgzDCISflbkga4YQBbuTpZuW4/7JDpB90g0t5K8872GQOnw1Oy8wCpDvdz05Cp13qt3 itPeXHAxVUVrGJs+T9+EU7NVfiyQp2rmNFRw1ruWp7vWMbQ7YoFiYHmnSIe0YJpLH8lYpc gDnRXFX7BBV9fx+7Wl98EQRXBS21At77+igTqMInoohjvdRbIgPo4GbaFv78rGyAUAo2ZT JcKazJPPM9e3NMGtg5dHUWKNH3a3TrPR6Emipp/DkBN0hPitbSZJ2r8N50dMNnESx4PGw9 E55e8M31XJJGKNiqMZVGh2NbytR/e8TSoKOlU1uX8jxEC/q52Df+SS/oLaSSwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721497109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SSOROpkJQXpGsPOchee0aqOeX6Qy6iBk1f4DUShWm1w=; b=IywUWXm6Uplu2tFzWe5oL6HpMVWRm5MqO3uXQ1lL9oDORPavbRGtLVj2u6U+bOuhWIApJB uuviNXSNB/yo7JyDB8Nb0nq1UD+WAIm4Lgp5RYl5JpU6d1ZbYehmJgj1+imcYt7cYw+ofO 4cBADa2zoNiRDFkRXP2pVZ5YbyPR1Oee4NPy9pAkoYAwhLXSsacThzst9B+p0Qz7cbow+w 57am6ks3fxTFWH6iaC8B8tm1eTu3UkN9nLJ1oE8MpZ5czs/qvV2U+ej96FkK4RBZgO4wRc qWoiONb6zogOe10dzmzRb4k+SiUZPXTfHq+OU9Yvu4EHkM7mkb+gWiDFLdFyOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WRDKd0R0lzQMN; Sat, 20 Jul 2024 17:38:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46KHcSds015691; Sat, 20 Jul 2024 17:38:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46KHcS3x015688; Sat, 20 Jul 2024 17:38:28 GMT (envelope-from git) Date: Sat, 20 Jul 2024 17:38:28 GMT Message-Id: <202407201738.46KHcS3x015688@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Popov Subject: git: 1e807e9107f0 - main - games/moonlight-embedded: Update to 2.7.0 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e807e9107f0315e74d6fc4a3ea6194a3423770e Auto-Submitted: auto-generated The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=1e807e9107f0315e74d6fc4a3ea6194a3423770e commit 1e807e9107f0315e74d6fc4a3ea6194a3423770e Author: Armin Zhu AuthorDate: 2024-07-20 12:33:01 +0000 Commit: Gleb Popov CommitDate: 2024-07-20 17:38:21 +0000 games/moonlight-embedded: Update to 2.7.0 PR: 280114 --- games/moonlight-embedded/Makefile | 35 +++++-- games/moonlight-embedded/distinfo | 6 +- .../moonlight-embedded/files/patch-CMakeLists.txt | 14 --- .../files/patch-libgamestream_CMakeLists.txt | 8 +- .../files/patch-libgamestream_client.c | 7 +- .../files/patch-libgamestream_http.c | 12 --- .../files/patch-src_audio_audio.h | 9 -- .../moonlight-embedded/files/patch-src_audio_oss.c | 108 --------------------- .../files/patch-src_input_evdev.c | 33 ++----- games/moonlight-embedded/files/patch-src_main.c | 11 ++- .../moonlight-embedded/files/patch-src_platform.c | 12 --- 11 files changed, 48 insertions(+), 207 deletions(-) diff --git a/games/moonlight-embedded/Makefile b/games/moonlight-embedded/Makefile index 7fd965f80162..b29c299b8f13 100644 --- a/games/moonlight-embedded/Makefile +++ b/games/moonlight-embedded/Makefile @@ -1,5 +1,5 @@ PORTNAME= moonlight-embedded -DISTVERSION= 2.6.2 +DISTVERSION= 2.7.0 CATEGORIES= games MASTER_SITES= https://github.com/moonlight-stream/moonlight-embedded/releases/download/v${DISTVERSION}/ @@ -19,28 +19,45 @@ LIB_DEPENDS= libavahi-client.so:net/avahi-app \ libexpat.so:textproc/expat2 \ libopus.so:audio/opus \ libudev.so:devel/libudev-devd \ - libuuid.so:misc/e2fsprogs-libuuid \ - libvdpau.so:multimedia/libvdpau \ - libva.so:multimedia/libva + libuuid.so:misc/e2fsprogs-libuuid -USES= cmake gl localbase:ldflags perl5 pkgconfig sdl ssl tar:xz xorg +USES= cmake localbase:ldflags perl5 pkgconfig sdl ssl tar:xz USE_LDCONFIG= yes -USE_GL= egl glesv2 USE_PERL5= build USE_SDL= sdl2 -USE_XORG= x11 NO_WRKSUBDIR= yes CFLAGS+= -DHAS_SOCKLEN_T=1 -I${LOCALBASE}/include/libepoll-shim/ LDFLAGS+= -lepoll-shim -CMAKE_OFF= ENABLE_CEC ENABLE_PULSE -CMAKE_ON= ENET_NO_INSTALL +CONFLICTS_INSTALL= moonlight-embedded-devel PLIST_FILES= bin/moonlight \ "@sample etc/moonlight.conf.sample" \ share/man/man1/moonlight.1.gz \ share/moonlight/gamecontrollerdb.txt +OPTIONS_DEFAULT= OSS X11 +OSS_DESC= Open Sound System support for embedded(not SDL) platform +PULSE_DESC= PulseAudio sound server support for embedded(not SDL) platform +CEC_DESC= Enable HDMI-CEC(TV controller) feature by using libcec.so +X11_DESC= Enable x11 and x11_vaapi platform using xorg +OPTIONS_SINGLE= SOUND +OPTIONS_SINGLE_SOUND= OSS PULSE +OPTIONS_GROUP= DISPLAY OTHERS +OPTIONS_GROUP_OTHERS= CEC +OPTIONS_GROUP_DISPLAY= X11 +OSS_CMAKE_ON= -DENABLE_PULSE:BOOL=false +PULSE_CMAKE_BOOL= ENABLE_PULSE +PULSE_LIB_DEPENDS= libpulse.so:audio/pulseaudio +CEC_CMAKE_BOOL= ENABLE_CEC +CEC_LIB_DEPENDS= libcec.so:multimedia/libcec \ + libp8-platform.so:devel/p8-platform +X11_USES= xorg gl +X11_USE= xorg=x11 gl=egl,glesv2 +X11_CMAKE_BOOL= ENABLE_X11 +X11_LIB_DEPENDS= libvdpau.so:multimedia/libvdpau \ + libva.so:multimedia/libva + post-extract: @${REINPLACE_CMD} -e 's|/etc/moonlight/|${PREFIX}/etc/moonlight/|g' \ ${WRKSRC}/docs/README.pod diff --git a/games/moonlight-embedded/distinfo b/games/moonlight-embedded/distinfo index fbade7d0fe56..368b842ee506 100644 --- a/games/moonlight-embedded/distinfo +++ b/games/moonlight-embedded/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1701007066 -SHA256 (moonlight-embedded-2.6.2.tar.xz) = 8bcc69b403a628efaf8686d40c0d1428b46defe4c65b06ff6ccc3fe32f0b2356 -SIZE (moonlight-embedded-2.6.2.tar.xz) = 328660 +TIMESTAMP = 1708491885 +SHA256 (moonlight-embedded-2.7.0.tar.xz) = 6527718e678dafd6e1e1876bbc6949538b38986d54ebda0b7fdc3b3f4af4f2dd +SIZE (moonlight-embedded-2.7.0.tar.xz) = 335984 diff --git a/games/moonlight-embedded/files/patch-CMakeLists.txt b/games/moonlight-embedded/files/patch-CMakeLists.txt deleted file mode 100644 index fef9d3015b15..000000000000 --- a/games/moonlight-embedded/files/patch-CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ ---- CMakeLists.txt.orig 2023-11-03 06:08:34 UTC -+++ CMakeLists.txt -@@ -87,6 +87,11 @@ add_executable(moonlight ${SRC_LIST}) - target_link_libraries(moonlight m) - target_link_libraries(moonlight gamestream) - -+if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") -+ set(ALSA_FOUND FALSE) -+ target_sources(moonlight PRIVATE ./src/audio/oss.c) -+endif() -+ - if (CEC_FOUND) - list(APPEND MOONLIGHT_DEFINITIONS HAVE_LIBCEC) - list(APPEND MOONLIGHT_OPTIONS CEC) diff --git a/games/moonlight-embedded/files/patch-libgamestream_CMakeLists.txt b/games/moonlight-embedded/files/patch-libgamestream_CMakeLists.txt index a758f6c03392..609280935a23 100644 --- a/games/moonlight-embedded/files/patch-libgamestream_CMakeLists.txt +++ b/games/moonlight-embedded/files/patch-libgamestream_CMakeLists.txt @@ -1,6 +1,6 @@ ---- libgamestream/CMakeLists.txt.orig 2023-11-03 06:08:34 UTC +--- libgamestream/CMakeLists.txt.orig 2024-02-20 04:01:31 UTC +++ libgamestream/CMakeLists.txt -@@ -3,7 +3,7 @@ set(SO_VERSION 4) +@@ -3,7 +3,7 @@ find_package(CURL REQUIRED) find_package(LibUUID REQUIRED) find_package(Threads REQUIRED) find_package(CURL REQUIRED) @@ -21,8 +21,8 @@ target_link_libraries(gamestream moonlight-common) set_target_properties(gamestream PROPERTIES SOVERSION ${SO_VERSION} VERSION ${PROJECT_VERSION}) -@@ -28,5 +28,3 @@ target_include_directories(moonlight-common PRIVATE .. - target_link_libraries(gamestream ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ${EXPAT_LIBRARIES} ${AVAHI_LIBRARIES} ${LIBUUID_LIBRARIES}) +@@ -28,5 +28,3 @@ target_link_libraries(gamestream ${CMAKE_THREAD_LIBS_I + target_link_libraries(gamestream ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ${EXPAT_LIBRARIES} ${AVAHI_LIBRARIES} ${LibUUID_LIBRARIES}) target_link_libraries(gamestream ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS}) - diff --git a/games/moonlight-embedded/files/patch-libgamestream_client.c b/games/moonlight-embedded/files/patch-libgamestream_client.c index 1efe5f0f8e14..175d9029755d 100644 --- a/games/moonlight-embedded/files/patch-libgamestream_client.c +++ b/games/moonlight-embedded/files/patch-libgamestream_client.c @@ -1,10 +1,9 @@ ---- libgamestream/client.c.orig 2023-11-03 06:08:34 UTC +--- libgamestream/client.c.orig 2024-02-20 04:01:31 UTC +++ libgamestream/client.c -@@ -537,7 +537,16 @@ int gs_pair(PSERVER_DATA server, char* pin) { +@@ -539,7 +539,15 @@ int gs_pair(PSERVER_DATA server, char* pin) { RAND_bytes(client_secret_data, sizeof(client_secret_data)); const ASN1_BIT_STRING *asnSignature; -+ +#ifdef __FreeBSD__ + #if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) X509_get0_signature(&asnSignature, NULL, cert); @@ -15,5 +14,5 @@ + X509_get0_signature(&asnSignature, NULL, cert); +#endif - char challenge_response[16 + SIGNATURE_LEN + sizeof(client_secret_data)]; + challenge_response = malloc(16 + asnSignature->length + sizeof(client_secret_data)); char challenge_response_hash[32]; diff --git a/games/moonlight-embedded/files/patch-libgamestream_http.c b/games/moonlight-embedded/files/patch-libgamestream_http.c deleted file mode 100644 index 112582df9d7c..000000000000 --- a/games/moonlight-embedded/files/patch-libgamestream_http.c +++ /dev/null @@ -1,12 +0,0 @@ ---- libgamestream/http.c.orig 2023-11-03 06:08:34 UTC -+++ libgamestream/http.c -@@ -73,6 +73,9 @@ int http_init(const char* keyDirectory, int logLevel) - int http_request(char* url, PHTTP_DATA data) { - curl_easy_setopt(curl, CURLOPT_WRITEDATA, data); - curl_easy_setopt(curl, CURLOPT_URL, url); -+#ifdef __FreeBSD__ -+ curl_easy_setopt(curl, CURLOPT_FORBID_REUSE, 1); -+#endif - - if (debug) - printf("Request %s\n", url); diff --git a/games/moonlight-embedded/files/patch-src_audio_audio.h b/games/moonlight-embedded/files/patch-src_audio_audio.h deleted file mode 100644 index 66625239ed63..000000000000 --- a/games/moonlight-embedded/files/patch-src_audio_audio.h +++ /dev/null @@ -1,9 +0,0 @@ ---- src/audio/audio.h.orig 2023-11-03 06:08:34 UTC -+++ src/audio/audio.h -@@ -31,3 +31,6 @@ extern AUDIO_RENDERER_CALLBACKS audio_callbacks_sdl; - extern AUDIO_RENDERER_CALLBACKS audio_callbacks_pulse; - bool audio_pulse_init(char* audio_device); - #endif -+#ifdef __FreeBSD__ -+extern AUDIO_RENDERER_CALLBACKS audio_callbacks_oss; -+#endif diff --git a/games/moonlight-embedded/files/patch-src_audio_oss.c b/games/moonlight-embedded/files/patch-src_audio_oss.c deleted file mode 100644 index ddd61c493d8a..000000000000 --- a/games/moonlight-embedded/files/patch-src_audio_oss.c +++ /dev/null @@ -1,108 +0,0 @@ ---- src/audio/oss.c.orig 2024-01-01 05:31:28 UTC -+++ src/audio/oss.c -@@ -0,0 +1,105 @@ -+/* -+ * This file is part of Moonlight Embedded. -+ * -+ * Copyright (C) 2015-2017 Iwan Timmer -+ * -+ * Moonlight 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 3 of the License, or -+ * (at your option) any later version. -+ * -+ * Moonlight 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 Moonlight; if not, see . -+ */ -+ -+#ifdef __FreeBSD__ -+#include -+#include -+#include "audio.h" -+ -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+static OpusMSDecoder* decoder; -+static short* pcmBuffer; -+static int samplesPerFrame; -+static int channelCount; -+static int fd = -1; -+ -+static int oss_renderer_init(int audioConfiguration, POPUS_MULTISTREAM_CONFIGURATION opusConfig, void* context, int arFlags) { -+ int rc; -+ decoder = opus_multistream_decoder_create(opusConfig->sampleRate, opusConfig->channelCount, opusConfig->streams, opusConfig->coupledStreams, opusConfig->mapping, &rc); -+ -+ channelCount = opusConfig->channelCount; -+ samplesPerFrame = opusConfig->samplesPerFrame; -+ pcmBuffer = malloc(sizeof(short) * channelCount * samplesPerFrame); -+ if (pcmBuffer == NULL) -+ return -1; -+ -+ const char* oss_name = "/dev/dsp"; -+ fd = open(oss_name, O_WRONLY); -+ if (fd == -1) { -+ printf("Open audio device /dev/dsp failed! error %d\n", errno); -+ return -1; -+ } -+ // buffer size for fragment ,selector 12 is 4096;11 is 2048;10 is 1024; 13is 8192 -+ int frag = 12; -+ if (ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &frag) == -1) -+ printf("Set fragment for /dev/dsp failed."); -+ -+ int format = AFMT_S16_LE; -+ int channels = opusConfig->channelCount; -+ int rate = opusConfig->sampleRate; -+ if (ioctl(fd, SNDCTL_DSP_SETFMT, &format) == -1) -+ printf("Set format for /dev/dsp failed."); -+ if (ioctl(fd, SNDCTL_DSP_CHANNELS, &channels) == -1) -+ printf("Set channels for /dev/dsp failed."); -+ if (ioctl(fd, SNDCTL_DSP_SPEED, &rate) == -1) -+ printf("Set sample rate for /dev/dsp failed."); -+ -+ return 0; -+} -+ -+static void oss_renderer_cleanup() { -+ if (decoder != NULL) { -+ opus_multistream_decoder_destroy(decoder); -+ decoder = NULL; -+ } -+ -+ if (pcmBuffer != NULL) { -+ free(pcmBuffer); -+ pcmBuffer = NULL; -+ } -+ -+ if (fd != -1) { -+ close(fd); -+ fd = -1; -+ } -+} -+ -+static void oss_renderer_decode_and_play_sample(char* data, int length) { -+ int decodeLen = opus_multistream_decode(decoder, data, length, pcmBuffer, samplesPerFrame, 0); -+ if (decodeLen > 0) { -+ write(fd, pcmBuffer, decodeLen * channelCount * sizeof(short)); -+ } else if (decodeLen < 0) { -+ printf("Opus error from decode: %d\n", decodeLen); -+ } -+} -+ -+AUDIO_RENDERER_CALLBACKS audio_callbacks_oss = { -+ .init = oss_renderer_init, -+ .cleanup = oss_renderer_cleanup, -+ .decodeAndPlaySample = oss_renderer_decode_and_play_sample, -+ .capabilities = CAPABILITY_DIRECT_SUBMIT | CAPABILITY_SUPPORTS_ARBITRARY_AUDIO_DURATION, -+}; -+#endif diff --git a/games/moonlight-embedded/files/patch-src_input_evdev.c b/games/moonlight-embedded/files/patch-src_input_evdev.c index f2812ca25ca6..c7f9be90ab9a 100644 --- a/games/moonlight-embedded/files/patch-src_input_evdev.c +++ b/games/moonlight-embedded/files/patch-src_input_evdev.c @@ -1,14 +1,7 @@ ---- src/input/evdev.c.orig 2023-11-03 06:08:34 UTC +--- src/input/evdev.c.orig 2024-02-20 04:01:31 UTC +++ src/input/evdev.c -@@ -38,9 +38,15 @@ - #include - #include - #include -+#ifdef __linux__ - #include -+#else -+#include -+#endif +@@ -45,6 +45,8 @@ + #endif #include +static bool isUseKbdmux = false; @@ -16,21 +9,7 @@ #if __BYTE_ORDER == __LITTLE_ENDIAN #define int16_to_le(val) val #else -@@ -66,8 +72,13 @@ struct input_device { - int hats_state[3][2]; - int fd; - char modifiers; -+ #ifdef __linux__ - __s32 mouseDeltaX, mouseDeltaY, mouseVScroll, mouseHScroll; - __s32 touchDownX, touchDownY, touchX, touchY; -+ #else -+ int32_t mouseDeltaX, mouseDeltaY, mouseVScroll, mouseHScroll; -+ int32_t touchDownX, touchDownY, touchX, touchY; -+ #endif - struct timeval touchDownTime; - struct timeval btnDownTime; - short controllerId; -@@ -749,7 +760,7 @@ static int evdev_handle(int fd) { +@@ -758,7 +760,7 @@ static int evdev_handle(int fd) { struct input_event ev; while ((rc = libevdev_next_event(devices[i].dev, LIBEVDEV_READ_FLAG_NORMAL, &ev)) >= 0) { if (rc == LIBEVDEV_READ_STATUS_SYNC) @@ -39,7 +18,7 @@ else if (rc == LIBEVDEV_READ_STATUS_SUCCESS) { if (!handler(&ev, &devices[i])) return LOOP_RETURN; -@@ -766,6 +777,39 @@ static int evdev_handle(int fd) { +@@ -775,6 +777,39 @@ static int evdev_handle(int fd) { return LOOP_OK; } @@ -79,7 +58,7 @@ void evdev_create(const char* device, struct mapping* mappings, bool verbose, int rotate) { int fd = open(device, O_RDWR|O_NONBLOCK); if (fd <= 0) { -@@ -840,6 +884,33 @@ void evdev_create(const char* device, struct mapping* +@@ -851,6 +886,33 @@ void evdev_create(const char* device, struct mapping* libevdev_has_event_code(evdev, EV_ABS, ABS_WHEEL) || libevdev_has_event_code(evdev, EV_ABS, ABS_GAS) || libevdev_has_event_code(evdev, EV_ABS, ABS_BRAKE)); diff --git a/games/moonlight-embedded/files/patch-src_main.c b/games/moonlight-embedded/files/patch-src_main.c index 827f3a3ade46..478f6ba2ccfa 100644 --- a/games/moonlight-embedded/files/patch-src_main.c +++ b/games/moonlight-embedded/files/patch-src_main.c @@ -1,4 +1,4 @@ ---- src/main.c.orig 2023-11-03 06:08:34 UTC +--- src/main.c.orig 2024-02-20 04:01:31 UTC +++ src/main.c @@ -42,6 +42,7 @@ #include @@ -54,16 +54,17 @@ #ifdef HAVE_SDL if (system == SDL) -@@ -362,6 +363,8 @@ int main(int argc, char* argv[]) { +@@ -362,6 +363,9 @@ int main(int argc, char* argv[]) { mappings = map; } + // test is use kbdmux driver -+ is_use_kbdmux(); ++ if (config.inputsCount <= 0) ++ is_use_kbdmux(); for (int i=0;i 0) printf("Adding input device %s...\n", config.inputs[i]); -@@ -398,7 +401,8 @@ int main(int argc, char* argv[]) { +@@ -398,7 +402,8 @@ int main(int argc, char* argv[]) { if (config.pin > 0 && config.pin <= 9999) { sprintf(pin, "%04d", config.pin); } else { @@ -73,7 +74,7 @@ } printf("Please enter the following PIN on the target PC: %s\n", pin); fflush(stdout); -@@ -406,6 +410,7 @@ int main(int argc, char* argv[]) { +@@ -406,6 +411,7 @@ int main(int argc, char* argv[]) { fprintf(stderr, "Failed to pair to server: %s\n", gs_error); } else { printf("Succesfully paired\n"); diff --git a/games/moonlight-embedded/files/patch-src_platform.c b/games/moonlight-embedded/files/patch-src_platform.c deleted file mode 100644 index 4fe2435269b2..000000000000 --- a/games/moonlight-embedded/files/patch-src_platform.c +++ /dev/null @@ -1,12 +0,0 @@ ---- src/platform.c.orig 2023-11-03 06:08:34 UTC -+++ src/platform.c -@@ -202,6 +202,9 @@ AUDIO_RENDERER_CALLBACKS* platform_get_audio(enum plat - #ifdef HAVE_ALSA - return &audio_callbacks_alsa; - #endif -+ #ifdef __FreeBSD__ -+ return &audio_callbacks_oss; -+ #endif - } - return NULL; - }