mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-01 23:35:55 +00:00
Set new hints present in SDL 2.0.15 development builds
This commit is contained in:
parent
137454beff
commit
af0921c5b2
@ -394,6 +394,11 @@ int main(int argc, char *argv[])
|
|||||||
// future KMSDRM platforms that use SDL for rendering.
|
// future KMSDRM platforms that use SDL for rendering.
|
||||||
SDL_SetHint(SDL_HINT_VIDEO_DOUBLE_BUFFER, "1");
|
SDL_SetHint(SDL_HINT_VIDEO_DOUBLE_BUFFER, "1");
|
||||||
|
|
||||||
|
// Use Direct3D 9Ex to avoid a deadlock caused by the D3D device being reset when
|
||||||
|
// the user triggers a UAC prompt. This option controls the software/SDL renderer.
|
||||||
|
// The DXVA2 renderer uses Direct3D 9Ex itself directly.
|
||||||
|
SDL_SetHint("SDL_WINDOWS_USE_D3D9EX", "1");
|
||||||
|
|
||||||
if (SDL_InitSubSystem(SDL_INIT_TIMER) != 0) {
|
if (SDL_InitSubSystem(SDL_INIT_TIMER) != 0) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
"SDL_InitSubSystem(SDL_INIT_TIMER) failed: %s",
|
"SDL_InitSubSystem(SDL_INIT_TIMER) failed: %s",
|
||||||
|
@ -49,22 +49,12 @@ SdlInputHandler::SdlInputHandler(StreamingPreferences& prefs, NvComputer*, int s
|
|||||||
// relative mode, the click event will trigger the mouse to be recaptured.
|
// relative mode, the click event will trigger the mouse to be recaptured.
|
||||||
SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
|
SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
|
||||||
|
|
||||||
#if defined(Q_OS_DARWIN) && !SDL_VERSION_ATLEAST(2, 0, 10)
|
// Enabling extended input reports allows rumble to function on Bluetooth PS4/PS5
|
||||||
// SDL 2.0.9 on macOS has a broken HIDAPI mapping for the older Xbox One S
|
|
||||||
// firmware, so we have to disable HIDAPI for Xbox gamepads on macOS until
|
|
||||||
// SDL 2.0.10 where the bug is fixed.
|
|
||||||
// https://github.com/moonlight-stream/moonlight-qt/issues/133
|
|
||||||
// https://bugzilla.libsdl.org/show_bug.cgi?id=4395
|
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_XBOX, "0");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if SDL_VERSION_ATLEAST(2, 0, 9)
|
|
||||||
// Enabling extended input reports allows rumble to function on Bluetooth PS4
|
|
||||||
// controllers, but breaks DirectInput applications. We will enable it because
|
// controllers, but breaks DirectInput applications. We will enable it because
|
||||||
// it's likely that working rumble is what the user is expecting. If they don't
|
// it's likely that working rumble is what the user is expecting. If they don't
|
||||||
// want this behavior, they can override it with the environment variable.
|
// want this behavior, they can override it with the environment variable.
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1");
|
SDL_SetHint("SDL_JOYSTICK_HIDAPI_PS4_RUMBLE", "1");
|
||||||
#endif
|
SDL_SetHint("SDL_JOYSTICK_HIDAPI_PS5_RUMBLE", "1");
|
||||||
|
|
||||||
m_OldIgnoreDevices = SDL_GetHint(SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES);
|
m_OldIgnoreDevices = SDL_GetHint(SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES);
|
||||||
m_OldIgnoreDevicesExcept = SDL_GetHint(SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT);
|
m_OldIgnoreDevicesExcept = SDL_GetHint(SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user