Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge SDL2 upstream #47

Merged
merged 51 commits into from
Jul 17, 2023
Merged

Merge SDL2 upstream #47

merged 51 commits into from
Jul 17, 2023

Conversation

capehill
Copy link

No description provided.

scribam and others added 30 commits July 1, 2023 23:26
(cherry picked from commit f73419e122ab0c2c7920b9de0921f5d6a464115d)
This fixes 'testautomation --filter clipboard_testClipboardTextFunctions' on Windows

(cherry picked from commit c24496727cdd40d5c0ffdf7b6a61085ec3a2766d)
Don't use the viewport offset when setting the clip rect in the D3D12 renderer.

This fixes "testautomation --filter render_testViewport" on Windows

(cherry picked from commit 304d425)
Also, for some reason ID3D11DeviceContext_OMGetRenderTargets() was failing in the second read pixels call in the "testautomation --filter render_testViewport" test.

We already know the target view, so just use that.

(cherry picked from commit 619f65a)
This fixes the following errors when a dll attempts to link to a shared SDL2::SDL2:

m.c.obj : error LNK2019: unresolved external symbol __imp___acrt_iob_func referenced in function printf
m.c.obj : error LNK2019: unresolved external symbol __imp___stdio_common_vfprintf referenced in function _vfprintf_l
MSVCRTD.lib(init.obj) : error LNK2019: unresolved external symbol _CrtDbgReport referenced in function _CRT_RTC_INIT
MSVCRTD.lib(init.obj) : error LNK2019: unresolved external symbol _CrtDbgReportW referenced in function _CRT_RTC_INITW
MSVCRTD.lib(error.obj) : error LNK2019: unresolved external symbol strcpy_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure@@YAXPEAXPEBD@Z)
MSVCRTD.lib(error.obj) : error LNK2019: unresolved external symbol strcat_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure@@YAXPEAXPEBD@Z)
MSVCRTD.lib(error.obj) : error LNK2019: unresolved external symbol __stdio_common_vsprintf_s referenced in function _vsprintf_s_l
MSVCRTD.lib(error.obj) : error LNK2001: unresolved external symbol __C_specific_handler_noexcept
MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol _wmakepath_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned __int64)" (?GetPdbDllPathFromFilePath@@YAHPEB_WPEA_W_K@Z)
MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol _wsplitpath_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned __int64)" (?GetPdbDllPathFromFilePath@@YAHPEB_WPEA_W_K@Z)
MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol wcscpy_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned __int64)" (?GetPdbDllPathFromFilePath@@YAHPEB_WPEA_W_K@Z)
MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol __vcrt_GetModuleFileNameW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPEAUHINSTANCE__@@xz)
MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol __vcrt_GetModuleHandleW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPEAUHINSTANCE__@@xz)
MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol __vcrt_LoadLibraryExW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPEAUHINSTANCE__@@xz)
(cherry picked from commit d0fdf62)
This reverts commit d0fdf62.

(cherry picked from commit f49f143)
We don't necessarily know the size of the output characters, so do a full 32-bit zero termination on the output string.

This fixes garbage at the end of Windows clipboard text

(cherry picked from commit ecbbac7)
video(wayland): use both --icon and --icon-name for Zenity

Many distros ship an older version of Zenity that supports GTK3, while some distros ship newer version of Zenity which uses libadwaita.

This command tries to use --icon and fall back to --icon-name when it fails.
This allows us to re-enable XInput correlation for RAWINPUT devices without reintroducing the controller shutdown bug for controllers using the wireless adapter in #3468.

Fixes #7940
Initializing "Windows.Gaming.Input.Gamepad" will put Bluetooth PS4 controllers into enhanced report mode, which breaks any game using DirectInput. Let's wait to do this until absolutely necessary.

(cherry picked from commit 785f57e)
… packet

That will put the PS4 controller into enhanced mode, which breaks DirectInput games

(cherry picked from commit efed248)
This fixes WGI correlation on startup when the WGI gamepad list isn't populated yet

(cherry picked from commit f047e17)
Currently, SDL_CLIPBOARDUPDATE events are only sent when an SDL window
has its selection cleared.  This change sends the event anytime the
XFixesSelectionNotify event is raised, and when the selection is either
the clipboard or the primary selection.
jshbrntt and others added 21 commits July 9, 2023 14:02
The xpad kernel driver doesn't know about these controllers and ends up using BTN_C and BTN_Z and the automatic mapping doesn't work correctly.

It turns out VID 0x045e and PID 0x02e0 is used by the 8BitDo SN30 Pro when connecting via Bluetooth in XInput mode.

Fixes #7925

(cherry picked from commit 80e1c75)
Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>
This report is for third party controllers only, and might be causing issues with fake PS4 controllers.

Reference #7960

(cherry picked from commit 092a4b7)
We shouldn't be doing any of this work in that case

(cherry picked from commit dfc5e69)
If there is only one controller slot available, assume that's the one matching new RAWINPUt devices. This will be right most of the time, and uncorrelation will fix any bad guesses.

(cherry picked from commit 41882a1)
This risks blocking the thread if disaster ensues, and we can wait in the
thread's main loop for subscription as well anywhere else.

Reference Issue #7971.

(cherry picked from commit 956b18f)
This probably worked by a quirk of the dynamic loader...?

(cherry picked from commit 6aef14f)
- Make sure the hotplug thread has hit its main loop before letting
  DetectDevices continue.
- Don't unref the context subscription operation until it completes
  (or we are shutting down).

I'm not sure which change fixed the problem, but at least one of them
appears to have done so.

Reference Issue #7971.
…referencing it

If, in the case where all displays has been disconnected, and some window state change occurs before an active display is re-added and finalized, the pointer returned by SDL_GetDisplayForWindow() will be null necessitating that the returned pointer be checked for validity before dereferencing it.
(cherry picked from commit 611b3dd)
@capehill capehill merged commit b51e076 into AmigaPorts:SDL2 Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.