346 Commits

Author SHA1 Message Date
James Poje
9c9bfd8428 Add quit-app-and-exit shortcut Ctrl+Alt+Shift+E
Add a shortcut to quit the current app and exit Moonlight entirely.
2025-04-02 21:55:38 -05:00
ABeltramo
d9c7a245ef
DualSense adaptive trigger support (#1561) 2025-04-01 21:45:25 -05:00
Cameron Gutman
dd2a99a96b Prepare for SDL3 support 2025-01-25 16:20:20 -06:00
Cameron Gutman
6d023c2dfa Defer launch warnings until after launch validation
We need to destroy the SDL window before we can be sure that Qt
can draw to the screen if we used KMSDRM.
2024-09-23 21:48:43 -05:00
Cameron Gutman
d1dffdc34c Prefer optimal 8-bit hardware codec if 10-bit codec is not available 2024-09-15 16:47:30 -05:00
Cameron Gutman
268f8db26b Never negotiate 10-bit profiles without a 10-bit renderer 2024-09-15 15:53:45 -05:00
Cameron Gutman
de28eda266 Don't enable HDR checkbox if no HDR renderers work 2024-09-15 15:09:11 -05:00
Cameron Gutman
02853e74ba Reduce the bitrate to YUV420 defaults if YUV444 was selected but not negotiated
If the user has selected a custom bitrate, we will leave it alone.
2024-09-12 21:52:27 -05:00
Cameron Gutman
46910cf774 Remove black background workaround now that SDL is fixed 2024-09-12 21:38:30 -05:00
Cameron Gutman
d2b3bc962f Probe for a HDR-compatible software renderer 2024-08-20 23:03:41 -05:00
Cameron Gutman
876375f7e9 Add additional codec negotiation improvements
- Fix picking incompatible YUV444 codec if software decoding was forced
- Prefer AV1 over HEVC when using HDR with software decoding
- Display software decoding warning when using an HDR codec without hardware decoding
2024-08-20 23:03:09 -05:00
Cameron Gutman
e662e93a53 Prioritize AV1 over HEVC for HDR with software decoding
dav1d is much faster than FFmpeg's HEVC decoder
2024-08-20 01:30:33 -05:00
Cameron Gutman
7c6954b5f6 Add HDR support with software decoding using libplacebo
Not supported on macOS yet.
2024-08-20 01:28:00 -05:00
Cameron Gutman
6d6cd6fc35 Improve codec autoselection logic
- Deprioritize codecs that don't have hardware decoding rather than rejecting them outright
- Allow AV1 to be negotiated with autoselection if no other codec is available
- Take into account YUV444 preference when picking an optimal codec
- Arrange codec preference in ascending order of computational complexity when hardware decoding is unavailable
2024-08-19 23:41:42 -05:00
Cameron Gutman
e01c42153c Allow software decoding if YUV444 is selected rather than falling back to YUV420 2024-08-19 20:58:16 -05:00
Cameron Gutman
9df65cb814 Allow selection of AV1 or HEVC for software decoding when HDR or YUV444 are enabled
These advanced features often/always are only supported with AV1 or HEVC.
2024-08-19 20:57:11 -05:00
ns6089
da0244c538 Support YUV 4:4:4 formats 2024-07-24 20:54:13 -05:00
Cameron Gutman
2e29ef8d74 Simplify codec selection and prioritization logic 2024-07-06 00:50:32 -05:00
Cameron Gutman
e76780e105 Add a new prepareToRender() callback for renders to perform their initial window clears
This consolidates all the clearing that was strewn across the codebase.
2024-06-25 23:12:18 -05:00
Cameron Gutman
1d1fa0577b Don't flush window events after the KMSDRM modeset operation
We will flush the initial window shown event that we require to start decoding.
2024-06-25 22:28:23 -05:00
Cameron Gutman
a9d7c8e495 Move forced KMSDRM modesetting operation into Session init code
Performing this each time DrmRenderer is initialized leads to long
delays when choosing a decoder on embedded platforms, particularly
those like TH1520/JH7110 which lack accelerated GL drivers.
2024-06-25 21:57:02 -05:00
Cameron Gutman
d7bc735edc Allow use of old fullscreen mode on macOS by setting I_WANT_BUGGY_FULLSCREEN=1 2024-06-09 15:46:24 -05:00
Cameron Gutman
b59de38e0b Revert "Only use SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES=0 for native notched resolution"
Users want to control when the notch is and is not included for display scaling.

Fixes #1301

This reverts commit e25d9b0da200154276fd0b8f44a0f7419420275f.
2024-06-09 15:42:39 -05:00
Cameron Gutman
a0c77d0ad8 Filter SDL_WINDOWEVENT_SHOWN after initial renderer creation
This case exists to handle the initial bringup of the renderer when
the window appears on screen. We can ignore these if we already
created a renderer, to avoid renderer re-creation if a spurious
SDL_WINDOWEVENT_SHOWN event arrives later.
2024-06-09 14:34:34 -05:00
Cameron Gutman
e25d9b0da2 Only use SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES=0 for native notched resolution
Full-screen and borderless windowed are now fully indistinguishable on macOS to avoid user confusion.

Fixes #861
2024-05-11 19:58:36 -05:00
Cameron Gutman
0dfa8a7b53 Override fullscreen mode if necessary for native resolutions to work as expected
Fixes #1244
2024-05-11 19:55:08 -05:00
Cameron Gutman
85a9f85c54 Add support for listing notch and notchless native resolution options 2024-05-11 19:48:01 -05:00
Cameron Gutman
6d220a9062 Allow audio to recover if no audio devices were present during stream start 2024-05-04 21:13:00 -05:00
Jorys Paulin
a412100a11
feat: added show performance overlay preference (#1209) 2024-04-30 21:37:52 -05:00
Cameron Gutman
d1ccd19fcc Make StreamingPreferences a proper singleton
This removes the need for several hacks in SettingsView to force updates and improves performance by not reloading preferences all over the place.
2024-04-14 13:01:30 -05:00
Cameron Gutman
6a85996b4a Clear the minimized state on the Qt window if the SDL window is not minimized 2024-04-07 00:42:51 -05:00
Cameron Gutman
610e07d4bd Improve state propagation between Qt and SDL windows 2024-03-26 21:42:13 -05:00
Cameron Gutman
a45695a22a Rework Qt window handling during SDL window creation
- Avoids blindly enumeration all top-level windows
- Properly tracks screen changes during the connection process
- Starts stream window minimized if the Qt window was minimized

Fixes #1231
2024-03-24 21:38:54 -05:00
Cameron Gutman
c9ad8ffa69 Stop using true fullscreen mode on Mac
It has numerous issues on modern Macs and seems to get worse every macOS release.
2024-03-24 13:55:43 -05:00
Cameron Gutman
be7694dd8b Improve fast AES heuristic for Linux ARM and unknown platforms 2024-01-15 14:16:56 -06:00
Cameron Gutman
ce8b24dfa7 Implement fast AES detection logic for Windows and macOS 2024-01-15 13:40:13 -06:00
Cameron Gutman
9ed8252cc6 Display error codes when the connection is terminated 2023-12-22 14:12:59 -06:00
Cameron Gutman
2a05b890d8 Enable transparent resizing and display changes for supported renderers 2023-12-17 21:15:40 -06:00
Cameron Gutman
0223394725 Fix manual codec options when using Vulkan for HDR
For now, we can't switch between GL and Vulkan on a single window, so performing decoder
probes with 8-bit formats may activate EGLRenderer which breaks Vulkan on our window.

It also speeds up stream launch validation for HDR cases in general, since we don't
perform unnecessary decoder probes for 8-bit profiles when the user wanted 10-bit.
2023-12-17 18:53:13 -06:00
Cameron Gutman
1ef083c952 Update moonlight-common-c to remove per-codec bitrate adjustments 2023-12-03 22:21:10 -06:00
Cameron Gutman
e76551cb64 Use the PC name alone as the streaming window title on macOS 2023-10-15 13:15:38 -05:00
Cameron Gutman
905b2ecf9e Change AV1 bitrate multiplier to match HEVC 2023-10-15 12:51:23 -05:00
Cameron Gutman
f7bb4611e9 Replace uses of strcpy() and sprintf() 2023-09-23 11:15:21 -04:00
Cameron Gutman
24ee6f96e1 Don't filter SOPS option by active resolutions with Sunshine 2023-09-11 21:25:29 -05:00
Cameron Gutman
64789ea8bc Destroy the VTRenderer before leaving fullscreen
Fixes #973
2023-09-11 21:07:54 -05:00
Cameron Gutman
9166e70524 Replace fixed "unsupported FPS" options with fully custom FPS option
Fixes #1003
2023-09-02 15:53:30 -05:00
Cameron Gutman
c8b9fda258 Fall back to HEVC if AV1 is forced and unavailable
Fixes #1053
2023-08-05 22:56:12 -05:00
Cameron Gutman
bfcd373eec Add PC name to streaming window title
Fixes #1039
2023-07-23 01:16:24 -05:00
Cameron Gutman
e7e9df3261 Populate AV1 bitrate multiplier 2023-07-16 15:54:58 -05:00
Cameron Gutman
abc391f32a Improve AV1 support 2023-07-16 15:38:58 -05:00