Commit Graph
3442 Commits
Author SHA1 Message Date
Cameron Gutman dd0b049048 Fix incorrect length passed to MultiByteToWideChar() 2026-11-14 22:59:52 -06:00
Cameron Gutman 4102bab53f Fix missing pthread_once_t initialization 2026-11-14 22:57:34 -06:00
Cameron Gutman 29f121a7d3 Fix moonlight-common-c with CONFIG+=disable-prebuilts on macOS 2026-11-13 00:58:24 -06:00
Cameron Gutman 8016954c23 Update moonlight-common-c 2026-11-13 00:58:24 -06:00
Cameron Gutman fe5a0aea98 Prevent lost wakupes in Pacer and ComputerManager 2026-11-12 20:40:31 -06:00
Cameron Gutman aad0090d97 Invoke QCoreApplication::quit() on the main thread
This is required to safely synchronize with the main loop.
2026-11-12 20:22:02 -06:00
Cameron Gutman 67dbfddb20 Fix use of undefined variable 2026-11-11 11:19:27 -06:00
Cameron Gutman 10523db24d Enable /guard:signret on Windows ARM64 2026-11-11 11:17:43 -06:00
Joel 4113dd26be Fix toolbar button resize loop when moving between displays (#2093)
NavigableToolButton bound its icon size to its background. Material's
ToolButton background is half the button height while the content is
square, but spans the full button width otherwise. When the window
straddles a 2x and a 1x display, the header row briefly lays out at a
smaller height, the content stops being square, and the icon width
becomes the button width. The button's implicit width is then icon +
padding, so every layout pass widens it by 12px without end and
reloads the SVG icon at each new size. The UI hangs and memory grows
until the process is killed.

Size the icon from the button's own height instead. That height comes
from Layout.preferredHeight, not from the icon, so there's no feedback
loop, and the icon stays 30x30 in the 60px toolbar as before.

Fixes #2092
2026-11-05 19:12:12 -06:00
Cameron Gutman 966638f91c Remove libplacebo patch that's no longer needed
Upstream libplacebo make internally synchronized queues opt-in.
2026-11-05 18:41:51 -06:00
Cameron Gutman 8cfc943737 Update SDL3, sdl2-compat, and libplacebo
SDL3 -> 3.4.20
sdl2-compat -> bebc6eb0
libplacebo -> v7.387.0

Fixes #2084
Fixes #2079
Fixes #2051
Fixes #2031
2026-11-05 18:10:16 -06:00
Cameron Gutman 029da3fb01 Improve readability of longer hostnames
Fixes #2064
2026-11-05 18:07:26 -06:00
Cameron Gutman 3fead131a6 Dynamically enable VK_KHR_internally_synchronized_queues for libplacebo v7.387.0
This is now disabled by default in libplacebo and must be explicitly
enabled when the application knows that all other code sharing the
device has been enlightened about the new queue synchronization flags.

Since we know that Gamescope's WSI doesn't handle these new flags
correctly, we will disable internally synchronized queues when
that layer is present. See ValveSoftware/gamescope#2261
2026-11-05 01:55:29 -06:00
Cameron Gutman a6276aa846 Check for unbound texture before registering with CUDA 2026-11-04 23:17:28 -06:00
Cameron Gutman aa54ba2a05 Reject 10-bit and YUV 4:4:4 in the CUDA path
Vulkan Video supports these on all Nvidia GPUs.
2026-11-04 23:12:39 -06:00
Cameron Gutman 1ced9dd9b0 Synchronize several renderer callbacks
Many renderers do not properly synchronize these on their own, so let's do it for them.

HDR and window changes are infrequent enough not to really matter.
2026-10-29 23:55:57 -05:00
Cameron Gutman 10270ca0f6 Move ownership of the overlay callback registration to Pacer
This allows it to synchronize with the lifetime of the rendering context.
2026-10-29 22:54:19 -05:00
Cameron Gutman 017b603972 Add a lock to ensure no overlay callbacks are active during unregistration 2026-10-29 22:43:24 -05:00
Cameron Gutman 3178022887 Remove use of deprecated functions in OpenSSL 4.1 2026-10-29 00:55:58 -05:00
Cameron Gutman ac296864ac Fix some error handling in the libplacebo renderer 2026-10-24 22:41:06 -05:00
Cameron Gutman 6fc7e81683 Handle H.264 SPS read/write failure in fixup path 2026-10-24 21:26:32 -05:00
Cameron Gutman 9fee675c91 Fix controller number check for adaptive triggers 2026-10-24 20:27:07 -05:00
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
Chris 8f2e52e540 Refuse to open a pre-existing log file (#2068)
On macOS, release builds log to /tmp/Moonlight-<epoch>.log. /tmp is
shared by all users and the file name is predictable, so another local
user could plant symlinks at upcoming log names and have Moonlight
truncate and overwrite any file the victim can write to. The log was
also created world-readable.

Open the log with QIODevice::NewOnly (O_CREAT|O_EXCL) so an existing
file or symlink is never opened, and create it readable only by the
owner on Qt 6.3+. If the open fails we keep logging to stderr, as we
already did for any other open failure.
2026-10-24 18:19:58 -05:00
Chris c8474c515c Avoid signed overflow in bs_read_se() (#2071)
bs_read_ue() can return values above INT32_MAX. bs_read_se() stored the
result in an int32_t and computed (r+1)/2, which is undefined behavior
when the code is 0x7FFFFFFF and gives wrong values for codes above
INT32_MAX. The SPS being parsed comes from the host during the H.264
SPS fixup.

Do the conversion in unsigned arithmetic. bs_read_ue() returns at most
0xFFFFFFFE, so both branches produce in-range int32_t values, and every
code that was previously well-defined decodes to the same value.
2026-10-24 18:17:00 -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