Commit Graph
100 Commits
Author SHA1 Message Date
Cameron Gutman d606709d83 Add some missing error handling 2026-10-24 19:54:47 -05:00
Cameron Gutman ba700d67ec Fix shadowed member variable with base class 2026-10-24 19:54:47 -05:00
Cameron Gutman 465c41b5c0 Fix uninitialized InitFailureReason field 2026-10-24 19:54:47 -05:00
Cameron Gutman 29a280eb38 Fix return type of EGLRenderer::loadAndBuildShader() 2026-10-24 19:46:14 -05:00
Cameron Gutman fb9daf85ab Keep the VBO alive while the VAO references it 2026-10-24 19:39:58 -05:00
Cameron Gutman df7db4018e Fix some EGL error handling paths 2026-10-24 19:39:58 -05:00
Cameron Gutman bfc6751f0f Fix fd leak in VAAPI KMSDRM codepath 2026-10-24 19:39:58 -05:00
Cameron Gutman 2b690d14ad Initialize VAAPIRenderer class members 2026-10-24 19:39:47 -05:00
Cameron Gutman 4158fa7823 Don't add EGL modifiers for VA images if they aren't set 2026-10-24 18:49:46 -05:00
Cameron Gutman 372887b8a2 Don't copy unpopulated EGLAttribs 2026-10-24 18:49:46 -05:00
Cameron Gutman 0c4f7aefb6 Handle unexpected appVersion/gfeVersion quads 2026-10-24 18:49:46 -05:00
Cameron Gutman 1826d4c232 Fix incorrect mmap() failure check 2026-10-24 18:49:46 -05:00
Cameron Gutman 40f83bd294 Avoid wedging VDPAU renderer if mixer creation fails 2026-10-24 18:49:46 -05:00
Cameron Gutman 781b26fd1c Completely disable connection caching on Qt 6.12+ 2026-10-22 23:01:46 -05:00
Cameron Gutman 74173b26eb Enforce a TCP/TLS HTTP timeout on Qt 6.3+
Timeouts for long requests like launch or resume timed the entire
HTTP operation. If the host was no longer reachable, we could
spend 2 minutes sitting there, even though we hadn't even made
successful contact with the host to give it our request yet.

Now we will time out a request if we can't send it in 5 seconds,
regardless of how long we want to wait for the server to respond.
2026-10-22 22:54:32 -05:00
Cameron Gutman b709bf5402 Handle musl headers without __NR_riscv_hwprobe defined 2026-10-22 22:14:04 -05:00
Cameron Gutman d79536b56d Only accept usable bounds if they differ from the full bounds
Some platforms (Wayland) just report the full display area, so we
incorrectly assume the entire display is usable for a window.

Fixes #2056
2026-10-22 20:53:30 -05:00
Cameron Gutman 74020b537b Don't start polling from the GUI for a CLI launch
We can end up missing early computerStateChanged signals.

Fixes #2039
2026-10-22 19:28:12 -05:00
Cameron Gutman dc92b6d2f3 Update moonlight-common-c 2026-10-20 00:35:04 -05:00
Cameron Gutman 9af0e9f539 Improve robustness and error handling of DXVsyncSource 2026-10-20 00:29:25 -05:00
Cameron Gutman e4db5c2c18 Check for pacing queue emptiness before dequeuing
This shouldn't actually be reachable when the queue
is empty, but we can check anyway to be safe.

Ref: #2054
2026-10-19 00:25:00 -05:00
Cameron Gutman 9b8886a6f5 Fix integer truncation warning on MSVC 2026-10-19 00:15:26 -05:00
Cameron Gutman f018a71a8a Override NSApplicationUpdateCycleEnabled to fix reduced mouse polling rate
Apps built with the macOS 26+ SDK default to an event loop synchronized to the display which caps input polling rates.

We have to use the plist for the opt-out, since NSApp is already set up by Qt before SDL can set this default.

Fixes #2036
2026-10-17 14:06:10 -05:00
Cameron Gutman b0af84ead1 Deploy the OpenSSL TLS backend for Qt
It supports TLS 1.3 and PQ-KEX back to Windows 10, unlike Schannel
2026-10-14 02:01:01 -05:00
Cameron Gutman 289782c6f3 Fix possible UB shift in bs_write_u() for large values of n 2026-10-14 01:51:15 -05:00
Cameron Gutman ee557e83c6 Include the trailing 16 bytes in the challengeResponseData check 2026-10-14 01:49:44 -05:00
Cameron Gutman 2bd4b9f721 Add missing checks for X509 parsing failures 2026-10-14 01:39:00 -05:00
Cameron Gutman fa6ae80940 Clamp additional values that can be used as array indices
These aren't exploitable in moonlight due to clamping done on the read side.
2026-10-14 01:09:54 -05:00
Cameron Gutman 71c3191e0c Remove warn_off for h264bitstream 2026-10-12 02:31:48 -05:00
Cameron Gutman a614924502 Don't hardcode the QSslKey algorithm 2026-10-12 02:31:21 -05:00
Cameron Gutman a57e947d71 Re-add the h264bitstream file headers mistakenly removed during vendoring 2026-10-07 20:19:06 -05:00
Cameron Gutman de2467e433 Fix MSI signing 2026-10-03 19:02:01 -05:00
Cameron Gutman b7e0deb168 Don't require SIGNTOOL_PARAMS to contain the 'sign' command 2026-10-03 18:37:39 -05:00
Cameron Gutman afcd08ccbc Require SIGNTOOL_PARAMS to be set externally 2026-10-03 18:30:08 -05:00
Cameron Gutman e8fefc8cd2 Prepare for v6.2.0 2026-10-03 16:32:35 -05:00
Cameron Gutman 018c851e76 Change the default streaming resolution to 1080p 2026-10-03 13:37:58 -05:00
Cameron Gutman 7927da33d6 Fix matching with colon-separated XDG_CURRENT_DESKTOP values 2026-10-03 13:11:12 -05:00
Cameron Gutman 32c6ab6eee Update Windows CI to Qt 6.12
macOS remains on Qt 6.11.2 for v6.x to retain Ventura support
2026-10-03 12:45:15 -05:00
Cameron Gutman 6e699e4dc9 Update libplacebo, sdl2-compat, and SDL3 2026-10-03 00:39:45 -05:00
Cameron Gutman 8369d1a0e1 Reduce gamepad CPU usage on Steam Link
- Gamepad sensors are now disabled by default
- Added a small deadzone to limit excess gamepad input reports
2026-09-27 17:39:10 -05:00
Cameron Gutman c0f62ad64e Distinguish between Enter and Numpad Enter
Fixes #2015
2026-09-26 15:21:11 -05:00
Cameron Gutman b75fe0d932 Reorganize a couple mouse and keyboard functions 2026-09-26 15:01:07 -05:00
Cameron Gutman 8ec572517b Fix CFG violation on startup in OpenSSL 2026-09-26 14:32:24 -05:00
Cameron Gutman b78956dba7 Update SDL to 383fb13 and disable CFG for OpenSSL
Closes #2020
2026-09-26 12:56:37 -05:00
Cameron Gutman 032529d782 Update FFmpeg to 9.0.2 and libplacebo to e2972fd 2026-09-20 15:23:43 -05:00
Cameron Gutman 49bf1e80da Update libplacebo to 3330a515 2026-09-17 23:14:00 -05:00
Cameron Gutman ec71a4f562 Update SDL3 in AppImage to fix several X11 issues 2026-09-15 01:44:47 -05:00
Cameron Gutman e3fd29e4d7 Fix a livelock that can occur between SDL, libdecor-gtk, and Qt
The Qt UI continuously redrawing prevents libdecor-gtk's glib dispatch loop
from ever returning since it constantly posts new messages to draw again.

The result is that Moonlight randomly hangs (with the spinner still animating)
at the "Starting app..." phase of connection establishment and never proceeds
until the livelock is broken by loss of focus, hiding the window, or similar.

For posterity, the hanging stack:

QtWaylandClient::QWaylandWindow::waitForFrameSync (this=this@entry=..., timeout=timeout@entry=...) at qwaylandwindow.cpp:891
QtWaylandClient::QWaylandGLContext::swapBuffers (this=..., surface=...) at qwaylandglcontext.cpp:494
QRhiGles2::endFrame (this=..., swapChain=..., flags=...) at qrhigles2.cpp:2390
QRhi::endFrame (this=..., swapChain=..., flags=...) at qrhi.cpp:11600
QSGGuiThreadRenderLoop::renderWindow (this=..., window=...) at qsgrenderloop.cpp:714
QQuickWindow::event (this=..., event=...) at qquickwindow.cpp:1663
QCoreApplication::notifyInternal2 (receiver=..., event=...) at qcoreapplication.cpp:1126
QCoreApplication::sendEvent (receiver=..., event=...) at qcoreapplication.cpp:1571
QPlatformWindow::deliverUpdateRequest (this=...) at qplatformwindow.cpp:831
QObject::event (this=..., e=...) at qobject.cpp:1480
QCoreApplication::notifyInternal2 (receiver=..., event=...) at qcoreapplication.cpp:1126
QCoreApplication::sendEvent (receiver=..., event=...) at qcoreapplication.cpp:1571
QCoreApplicationPrivate::sendPostedEvents (receiver=..., event_type=..., data=...) at qcoreapplication.cpp:1926
postEventSourceDispatch (s=...) at qeventdispatcher_glib.cpp:248
g_main_dispatch (context=...) at gmain.c:3591
g_main_context_dispatch_unlocked (context=...) at gmain.c:4451
g_main_context_iterate_unlocked (context=context@entry=..., block=block@entry=..., dispatch=dispatch@entry=..., self=...) at gmain.c:4516
g_main_context_iteration (context=..., context@entry=..., may_block=may_block@entry=...) at gmain.c:4582
libdecor_plugin_gtk_dispatch (plugin=..., timeout=...) at libdecor-gtk.c:509
Wayland_PumpEvents (_this=...) at SDL_waylandevents.c:610
Wayland_GLES_LoadLibrary (_this=..., path=...) at SDL_waylandopengles.c:51
SDL_GL_LoadLibrary_REAL (path=...) at SDL_video.c:4735
SDL_RecreateWindow (window=..., flags=...) at SDL_video.c:2796
GLES2_CreateRenderer (renderer=..., window=..., create_props=...) at SDL_render_gles2.c:2329
SDL_CreateRendererWithProperties_REAL (props=props@entry=...) at SDL_render.c:1126
SDL_CreateRenderer_REAL (window=..., name=...) at SDL_render.c:1287
SDL_CreateRenderer_REAL (window=..., idx=..., flags=...) at sdl2_compat.c:5986
EGLRenderer::initialize (this=..., params=...) at eglvid.cpp:445
FFmpegVideoDecoder::initializeRendererInternal (this=..., renderer=..., params=...) at ffmpeg.cpp:323
FFmpegVideoDecoder::createFrontendRenderer (this=..., params=..., useAlternateFrontend=...) at ffmpeg.cpp:426
FFmpegVideoDecoder::completeInitialization (this=..., decoder=..., requiredFormat=..., params=..., testMode=..., useAlternateFrontend=...) at ffmpeg.cpp:486
FFmpegVideoDecoder::tryInitializeRenderer(AVCodec const*, AVPixelFormat, _DECODER_PARAMETERS*, AVCodecHWConfig const*, IFFmpegRenderer::InitFailureReason*, std::function<IFFmpegRenderer* ()>)
    (this=..., decoder=..., requiredFormat=..., params=..., hwConfig=..., failureReason=..., createRendererFunc=...) at ffmpeg.cpp:1200
FFmpegVideoDecoder::tryInitializeHwAccelDecoder (this=..., params=..., pass=..., terminallyFailedHardwareDecoders=...) at ffmpeg.cpp:1544
FFmpegVideoDecoder::initialize (this=..., params=...) at ffmpeg.cpp:1701
Session::chooseDecoder (vds=..., renderer=..., window=..., videoFormat=..., width=..., height=..., frameRate=..., enableVsync=..., enableFramePacing=..., testOnly=..., chosenDecoder=...) at session.cpp:322
Session::getDecoderAvailability (window=..., vds=..., videoFormat=..., width=..., height=..., frameRate=...) at session.cpp:498
Session::initialize (this=..., qtWindow=...) at session.cpp:755
2026-09-10 21:00:57 -05:00
Cameron Gutman 14c26d8c7d Update moonlight-common-c with frame loss fixes 2026-09-08 23:49:33 -05:00
Cameron Gutman f743c23663 Fix PixelShaderMinPrecision bitfield comparison 2026-09-07 00:07:10 -05:00
Cameron Gutman e9d77967a6 Replace Nvidia FL 11.1 check with driver version check
The bug is driver-specific rather than GPU-specific.
2026-09-06 22:53:24 -05:00
Cameron Gutman 31ce68f136 Log the GPU driver version in the D3D11VA renderer 2026-09-06 22:22:07 -05:00
Cameron Gutman b86b5f71e3 Allow separate devices for Vega+ and block them for Fermi
Fermi is known broken, Kepler and Maxwell v1 may work but are currently untested
2026-09-06 16:12:52 -05:00
Cameron Gutman 09873287ca Only use separate D3D11 devices on Intel and Nvidia
Preserve the texture array binding path on AMD FL11.1+, since it seems to work fine on Polaris with shared devices.

Fixes #2003
2026-09-06 15:21:11 -05:00
Cameron Gutman 54f8fed51d Don't try fallback driver paths with the host libva 2026-09-05 14:30:28 -05:00
Cameron Gutman c045ae8986 Update to SDL 3.4.16 2026-09-05 00:21:22 -05:00
Cameron Gutman da19fa73fa Fix typo in vaMapBuffer2 2026-09-03 00:24:33 -05:00
Cameron Gutman 3516591b99 Fix bad APPDIR when running an extracted AppImage 2026-09-03 00:10:27 -05:00
Cameron Gutman b1824e9dbb Check for vaMapBuffers2 which is required by FFmpeg with libva 2.21+ 2026-09-03 00:07:42 -05:00
Cameron Gutman 513ceca9ff Disable everything except libva-x11 for AppImages
We don't build with DRM or Wayland support and libva-probe.c doesn't check libva-drm or libva-wayland.
2026-09-03 00:06:07 -05:00
Cameron Gutman 0eff3b9b4d Update CI builds to Qt 6.11.2 2026-08-30 16:35:32 -05:00
Cameron Gutman 1c8b23c7f8 Update dependencies
libplacebo -> 41ac298
OpenSSL -> 3.6.4
Vulkan SDK -> 1.4.357
2026-08-30 16:24:09 -05:00
Cameron Gutman 1da6ff434c Update qmdnsengine submodule with latest upstream changes
Fixes #1983
2026-08-26 01:31:31 -05:00
Cameron Gutman d2f6990be6 Send LI_CTYPE_STEAM for known Steam Controllers 2026-08-18 22:26:07 -05:00
Cameron Gutman 256022d3d6 Quiet the 'where' invocations in build-arch.bat 2026-08-14 23:24:53 -05:00
Cameron Gutman da3312347d Remove checked-in vswhere.exe binary 2026-08-14 23:23:57 -05:00
Cameron Gutman 6cae32bf53 Remove checked-in jom.exe binary 2026-08-14 23:16:00 -05:00
Cameron Gutman 2e13ed9977 Update FFmpeg to fix 8-bit D3D11VA full range decoding 2026-08-06 22:23:30 -05:00
Cameron Gutman 7cf8b46c79 Pass the correct renderer to EGLImageFactory
We should be using the EGL renderer's colorspace and color range
rather than the backend renderer's for fallbacks. The former is
what actually gets passed to the host PC during stream init.
2026-08-06 00:29:53 -05:00
Cameron Gutman c1623ff44e Switch the default renderer color range to full 2026-08-05 23:56:18 -05:00
Cameron Gutman b2f0828df8 Use requested color range as a fallback in isFrameFullRange() 2026-08-05 23:54:19 -05:00
Cameron Gutman 3f26217df7 Select color range based on plane COLOR_RANGE property values 2026-08-05 23:49:09 -05:00
Cameron Gutman 4570fba87d Add full range handling to SdlRenderer 2026-08-05 23:44:11 -05:00
Cameron Gutman a903c5cef2 Explicitly request limited range for renderers that require it 2026-08-05 23:25:30 -05:00
Cameron Gutman 2bea406f67 Guess frame color metadata if left unspecified
Some decoders don't populate metadata, but the renderer may need it
to determine which shader or EGL import parameters to use.
2026-08-05 22:56:34 -05:00
Cameron Gutman fcba7df82c Update Windows and macOS build requirements 2026-08-05 00:56:04 -05:00
Cameron Gutman 5ac254216c Update LSMinimumSystemVersion to match Qt 6.10+ and our prebuilts 2026-08-05 00:54:52 -05:00
Cameron Gutman 131cb27095 Add NSBonjourServices entry to Info.plist 2026-08-05 00:24:45 -05:00
Cameron Gutman b5d7f3b9f8 Update Windows, macOS, and AppImage dependencies
- SDL -> 3.4.14
- FFmpeg -> 9.0
- libplacebo -> 4d82c689
2026-08-04 23:12:04 -05:00
Cameron Gutman 546cb72e32 Update Windows, macOS, and AppImage dependencies
- SDL -> c9ad2963
- dav1d -> 1.5.4
- Detours rebuilt with EHCont
2026-07-27 00:48:37 -05:00
Cameron Gutman 7f7f2c26d0 Fix capturing mouse motion outside the window on sdl2-compat 2026-07-27 00:10:06 -05:00
Cameron Gutman 7794a42843 Fix C4146 warning on MSVC 2026-07-26 20:12:58 -05:00
Cameron Gutman 3aa111e825 Fix unused parameter warning on non-macOS platforms 2026-07-26 20:03:04 -05:00
Cameron Gutman f8158e02fb Update MSVC redistributable in the installer 2026-07-26 19:46:27 -05:00
Cameron Gutman fba7c4119a Validate that the SPS didn't change in debug builds 2026-07-26 19:39:34 -05:00
Cameron Gutman 3e24a7a1a5 Fix several bugs in h264bitstream 2026-07-26 19:23:34 -05:00
Cameron Gutman acea86de24 Revert "Make h264bitstream dependency optional"
This reverts commit 2328713f4e.
2026-07-26 19:23:34 -05:00
Cameron Gutman b7adc70ea4 Import minimal set of code from h264bitstream needed for SPS fixups 2026-07-26 19:23:34 -05:00
Cameron Gutman 2fc0d84aa0 Write the original H.264 SPS if it required no fixups 2026-07-26 18:33:28 -05:00
Cameron Gutman 490229be3f Fix GEM handle leak in DRM renderer
Huge thanks to @oliverlj for identifying this longstanding bug.

This is likely responsible for many different issues with the DRM renderer randomly failing.
2026-07-26 15:22:15 -05:00
Cameron Gutman b9650b6a72 Switch to our fork of h264bitstream 2026-07-26 13:33:04 -05:00
Cameron Gutman 2328713f4e Make h264bitstream dependency optional 2026-07-19 14:11:27 -05:00
Cameron Gutman 2a1749e231 Add workaround for gamescope#2261
Fixes #1925
2026-07-18 18:19:35 -05:00
Cameron Gutman 4453e4aef1 Add a renderer selection option for macOS
There are numerous conflicting reports about which Mac renderer works best (even on the same systems!). I give up, just let the users figure it out.
2026-07-18 16:38:40 -05:00
Cameron Gutman c0c4d60565 Update AppImage libva to 2.24.1 2026-07-08 23:58:15 -05:00
Cameron Gutman 8b18d58aa0 Add workaround for interoperability issue with out-of-tree FFmpeg zero-copy v4l2m2m patches and libplacebo
Fixes #1786
2026-07-08 23:40:08 -05:00
Cameron Gutman 0c8970364c Switch to upstream nanors with native SIMD and GFNI runtime dispatching 2026-07-05 00:14:34 -04:00
Cameron Gutman 1516464f82 Modernize ASAN flags for MSVC 2026-07-04 15:37:21 -04:00
Cameron Gutman fd34a1fd28 Disable the text outline when line wrapping is required 2026-07-01 23:43:40 -05:00
Cameron Gutman 9067db8915 Switch to UTF-8 for overlay text rendering 2026-07-01 23:24:31 -05:00