Sam Lantinga
8e153922e4
This packet didn't end up being needed to initialize input for the Xbox One Elite Series 2 controller
2019-11-22 17:46:30 -08:00
Sam Lantinga
6dce9733d9
Use SDL_zeroa() appropriately
2019-11-22 16:23:37 -08:00
Sam Lantinga
733f25252a
Fixed build
2019-11-22 14:09:24 -08:00
Sam Lantinga
13006ba9e1
Added support for the PDP Versus Fighting Pad
2019-11-22 13:44:40 -08:00
Sam Lantinga
b5aff9d7c3
Added SDL_GameControllerTypeForIndex() and SDL_GameControllerGetType() to return the type of controller attached.
2019-11-22 13:12:12 -08:00
Sam Lantinga
c0650aca21
Added support for the PDP Battlefield One controller
2019-11-21 14:04:48 -08:00
Sam Lantinga
a132b183cd
Fixed the guide button on the NVIDIA Controller v01.04
2019-11-21 13:09:00 -08:00
Sam Lantinga
cc4f890521
Added support for the NVIDIA Controller v01.04 on Linux and Mac OS X
2019-11-21 12:11:47 -08:00
Sam Lantinga
2a7b635b9b
Added support for the NVIDIA Controller v01.04 on Android
2019-11-21 11:52:50 -08:00
Sam Lantinga
51487a71b9
Added support for the MOGA XP5-A Plus
2019-11-21 10:14:57 -08:00
Ozkan Sezer
405a3c821b
ran gendynapi.pl after newly added SDL_string.c functions.
2019-11-21 11:50:50 +03:00
Sam Lantinga
650964461e
Improved XInput VID/PID detection and added SDL_wcsstr() and SDL_wcsncmp()
2019-11-20 16:42:50 -08:00
Ozkan Sezer
eb8f14bb6a
added SDL_strtokr() as a replacement for POSIX strtok_r (bug #4046.)
2019-11-20 20:40:50 +03:00
Sam Lantinga
ce8411c587
Fixed Xbox One Elite Series 2 showing up as 2 devices in Bluetooth mode on Windows
2019-11-20 08:43:24 -08:00
Ozkan Sezer
200d37dabb
SDL.c (SDL_ExitProcess): unconstify its param to match its declaration.
2019-11-20 02:47:40 +03:00
Sam Lantinga
972a70d844
Added support for the Xbox One Elite Series 2 controller on Mac OSX
2019-11-19 15:15:00 -08:00
Sam Lantinga
68d8fc5c7b
Added support for the Xbox One Elite Series 2 controller in wired mode
2019-11-18 15:46:13 -08:00
Sam Lantinga
2bfcf5cd96
Added Linux controller mapping for the Xbox One Elite Series 2 controller in Bluetooth mode
2019-11-18 14:08:05 -08:00
Sam Lantinga
1e24a1514d
Added names for some missing Xbox controllers
2019-11-18 11:51:39 -08:00
Sam Lantinga
144956442d
Added identifiers for the Xbox One Elite Series 2 controller
2019-11-18 11:44:51 -08:00
Sam Lantinga
df728f8591
Fixed unused function warning on Android
2019-11-18 10:48:14 -08:00
Sam Lantinga
dd7fe0af08
Fixed bug 4814 - Missing scancodes on Linux
...
Michael Roe
The mappings for keyboard scancodes on Linux do not include keypad left and right parentheses (used on some Microsoft keyboard), keypad plus/minus, LANG1 and LANG2 (used on Korean keyboards), XK86MenuKB, and F20 (remapped to Audio Mic Mute in the usual X11 config).
2019-11-16 22:45:49 -08:00
Sam Lantinga
b1539c4c49
Fixed bug 4819 - Attempting to create an OpenGL ES context with unachievable MSAA parameters under X11 dooms the program
...
Solra Bizna
I have written a program that, in the event that the user requests more MSAA samples than their hardware supports, attempts to gracefully fall back to the best MSAA available. This code works with my conventional OpenGL renderer, but if I change nothing about the code except to make it request an OpenGL ES profile instead, Xlib kills the program with an error that looks like:
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 4 (X_DestroyWindow)
Resource id in failed request: 0x5c00008
Serial number of failed request: 188
Current serial number in output stream: 193
To trigger the bug, attempt to create a window with the SDL_WINDOW_OPENGL flag, with SDL_GL_CONTEXT_PROFILE_MASK set to SDL_GL_CONTEXT_PROFILE_ES, and with SDL_GL_MULTISAMPLESAMPLES set to any unsupported value. SDL_CreateWindow properly returns NULL, but at this point the program is already doomed. Xlib will shortly terminate the program with an error. Calling SDL_CreateWindow again will immediately trigger this termination.
I have attached a skeletal program that reproduces this bug for me. Replacing SDL_GL_CONTEXT_PROFILE_ES with SDL_GL_CONTEXT_PROFILE_COMPATIBILITY avoids the bug (but, obviously, doesn't create an OpenGL ES context).
As I suspected, the problem was with XDestroyWindow being called twice on the same window. The X11_CreateWindow function in src/video/x11/SDL_x11window.c calls SetupWindowData. If initialization fails after that point, XDestroyWindow gets called on the window by a subsequent call to X11_DestroyWindow. But, later in the same function, iff a GLES context is requested and initializing it fails, X11_XDestroyWindow (which wraps XDestroyWindow) is manually called. Shortly after, the intended call to X11_DestroyWindow occurs, which attempts to destroy the same window again. Boom.
(The above confusing summary involves three separate, similarly-named functions: XDestroyWindow, X11_DestroyWindow, X11_XDestroyWindow)
I have attached a simple patch that removes the redundant X11_XDestroyWindow calls. I've tested that XDestroyWindow still gets called for the windows in question, and that it only gets called once.
2019-11-16 22:35:48 -08:00
Cameron Cawley
85aabec27e
atomic: Support compiling on ARMv3
2019-10-11 22:08:53 +01:00
Cameron Cawley
20ddf45ede
Added SDL_PIXELFORMAT_BGR444
2019-11-02 22:58:52 +00:00
Sam Lantinga
a9ac9e3865
Don't try to use this driver with the Xbox One S in Bluetooth mode on Linux
2019-11-16 19:58:29 -08:00
Sam Lantinga
9ca5373024
Added support for the Xbox One S controller in Bluetooth mode on Linux
2019-11-16 19:55:53 -08:00
Sylvain Becker
9d4c3f12cd
Fix missing prototype warning
2019-11-16 22:59:56 +01:00
Sylvain Becker
2dab79bcc2
Fix crash when detecting SIMD
2019-11-16 22:55:36 +01:00
Sam Lantinga
cf33f1f0ef
Added a utility function to simplify the hint handling logic
2019-11-13 21:53:01 -08:00
Sam Lantinga
a63e93a193
Supported Android and Apple hardware has ARM SIMD capability
2019-11-13 15:46:58 -08:00
Sam Lantinga
9a76bebfbc
SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS defaults to true, to match Steam's default behavior
2019-11-13 14:24:48 -08:00
EXL
b44fe0f838
haiku: Rename BE_* entities to HAIKU_*
...
In favor Bugzilla #2349 .
Update copyright years to 2019.
Partially fixes Bugzilla #4442 .
2019-11-12 17:24:37 -05:00
Peter Kosyh
33ae5e5e99
haiku: mouse_relative fix
...
Partially fixes Bugzilla #4442 .
2019-11-11 22:23:33 -05:00
Peter Kosyh
79510b7569
haiku: mouse->ShowMouse method added
...
Partially fixes Bugzilla #4442 .
2019-11-11 22:22:40 -05:00
Gerasim Troeglazov
95a402d745
haiku: Add support for relative mouse mode.
...
Partially fixes Bugzilla #4442 .
2019-11-11 22:21:17 -05:00
Gerasim Troeglazov
bd648bd5a3
haiku: Add simple relative mode for mouse.
...
Partially fixes Bugzilla #4442 .
2019-11-11 22:18:21 -05:00
Adrien Destugues
3b516e633b
haiku: Fix crash when opening window.
...
- _num_clips was not set in constructor, so a NULL _clips could be
mistakenly dereferenced.
- As _clips is accessible outside the class, it is not a good idea to
free/reallocate it. Try to limit this by reallocating only when it needs to
grow.
Partially fixes Bugzilla #4442 .
2019-11-11 22:14:00 -05:00
Jerome Duval
50806eeea2
haiku: use addr_t instead of size_t for OpenGL dynamic loading.
...
Partially fixes Bugzilla #4442 .
2019-11-11 22:04:10 -05:00
Peter Kosyh
55b5d8dce6
haiku: Invert mouse wheel values to match what SDL expects.
...
Partially fixes Bugzilla #4442 .
2019-11-11 21:59:39 -05:00
EXL
b22fb9e2ba
haiku: Implement message box for Haiku
...
Add implementation for functions:
SDL_ShowSimpleMessageBox()
SDL_ShowMessageBox()
Add simple customization support also.
Fix build for x86_gcc2.
Partially fixes Bugzilla #4442 .
2019-11-11 16:44:40 -05:00
Ozkan Sezer
a365c7f6fb
ran gendynapi.pl after SDL_HasARMSIMD() addition
2019-11-04 11:15:24 +03:00
Sylvain Becker
303646a697
Android: some readability: redundant casts, deads stores, redundant control flow
2019-10-31 15:53:10 +01:00
Ozkan Sezer
fea3c8bdef
SDL_qsort.c: sync comments with version 1.15 from mainstream
2019-10-31 17:10:02 +03:00
Sylvain Becker
88ba6798e9
Wayland: touch events, use of memory after it is freed
2019-10-30 21:12:36 +01:00
Sylvain Becker
86ae245bc0
Use correct enum: typo in org_kde_kwin_server_decoration_mode
...
instead of org_kde_kwin_server_decoration_manager_mode
2019-10-30 17:59:20 +01:00
Sylvain Becker
81cdd50002
Remove redundant 'SDL_GetErrBuf' declaration
2019-10-30 17:35:40 +01:00
Sylvain Becker
9e509e4a4f
SDL_render_gles2: remove ineffective widening cast
...
warning: either cast from 'int' to 'size_t' (aka 'unsigned long') is ineffective, or there is loss of precision before the conversion [bugprone-misplaced-widening-cast]
2019-10-30 16:45:53 +01:00
Sylvain Becker
ce308a7841
revert this const parameter for X11 function
2019-10-30 16:33:32 +01:00
Sylvain Becker
dab55a8d23
Readability: remove redundant cast
2019-10-30 16:20:58 +01:00
Sylvain Becker
f16e51068b
Fix const warning in RLE getpix functions
2019-10-30 16:17:59 +01:00
Sylvain Becker
25d53a4475
SDL_syspower.c: remove redundant expression
2019-10-30 16:12:39 +01:00
Sylvain Becker
d4a67e2541
Readability: change some pointer parameter to be pointer to const
2019-10-30 16:06:51 +01:00
Sylvain Becker
3d100df36f
Readability: remove const-qualifation from function declaration
...
const-qualification of parameters only has an effect in function definitions
2019-10-30 15:43:49 +01:00
Sylvain Becker
60d3965ece
Readability: remove redundant return, continue, enum declaration
2019-10-30 15:36:17 +01:00
Sylvain Becker
b458d7a28f
Readability: remove redundant cast to the same type
2019-10-30 15:13:55 +01:00
Sylvain Becker
56cbe12037
BlitAuto: remove redundant cast to the same type
2019-10-30 14:37:06 +01:00
Sylvain Becker
735691ecd6
Remove nested redundant #ifndef
2019-10-30 14:29:41 +01:00
Sylvain Becker
ff0d9245a9
SDL_syspower: remove dead store warning
...
Value stored to 'str' during its initialization is never read
2019-10-30 14:26:18 +01:00
Sylvain Becker
42153342ab
Use fill_function for FillRect SIMD/NEON (bug 4365)
2019-10-29 16:13:41 +01:00
Alex Szpakowski
bda618a2af
iOS: remove some unused code, minor code style cleanup.
2019-10-27 11:41:48 -03:00
Alex Szpakowski
df49e2a572
iOS: replace a deprecated function call with a non-deprecated equivalent.
2019-10-27 11:41:11 -03:00
Sylvain Becker
7289e5e215
Android: remove warning in blit_features
...
"integer constant not in range of enumerated type 'enum blit_features'"
2019-10-27 15:22:28 +01:00
Sylvain Becker
463bf5c2d8
Android: fix compilation error of SDL_cpuinfo.c on android-r13b (bug 4365)
2019-10-27 14:52:09 +01:00
Ryan C. Gordon
c0255be458
x11: check if the X server honored our XMoveWindow() call (thanks, R.E. Rust!).
...
This can happen if a window is still grabbed when we try to move it, or if
the X11 ecosystem is just in a bad mood, I guess.
This makes sure that SDL will report the correct position for a window;
otherwise, SDL_GetWindowPosition will just report whatever the last
SDL_SetWindowPosition call requested, even if the window didn't actually move.
Fixes Bugzilla #4646 .
2019-10-26 23:58:55 -04:00
Alex Szpakowski
a963e36e2d
macOS: more robust detection and switching of exclusive-fullscreen display modes (bug #4822 ).
2019-10-26 15:27:51 -03:00
Alex Szpakowski
a9b867ab07
macOS Fix potential memory leaks in the Metal renderer caught by clang's static analyzer.
2019-10-26 14:39:50 -03:00
Ryan C. Gordon
1ce1364b29
d3d11: Don't fail if there's no vertex data to upload (thanks, Martin!).
...
Fixes Bugzilla #4832 .
2019-10-26 12:56:18 -04:00
Ryan C. Gordon
6dffc5d461
cpuinfo: Remove incorrect #warning when building for non-ARM architectures.
2019-10-25 00:07:30 -04:00
Ben Avison
72f8044a42
ARM: NEON assembly optimization for SDL_FillRect
2019-10-24 21:17:52 -04:00
Ben Avison
1187b013a5
ARM: NEON assembly optimization for function BlitARGBto565PixelAlpha
2019-10-24 21:17:38 -04:00
Ben Avison
2dfe060564
ARM: NEON assembly optimization for function BlitRGBtoRGBPixelAlpha
2019-10-24 21:17:19 -04:00
Ben Avison
74846657ec
ARM: SIMD optimization for 4:4:4:4 to 8:8:8:8 normal blits
2019-10-24 21:15:50 -04:00
Ben Avison
becc649ae2
ARM: assembly optimization for SDL_FillRect
2019-10-24 21:15:35 -04:00
Ben Avison
7ac733f025
ARM: SIMD assembly optimization for BGR-to-RGB 32bpp normal blits
2019-10-24 21:15:21 -04:00
Ben Avison
8425d9d5d0
SDL_blit: use a named enum for required hardware bits in dispatch tables
2019-10-24 21:15:09 -04:00
Ben Avison
0eaa52cedf
ARM: SIMD assembly optimization for function BlitARGBto565PixelAlpha
2019-10-24 21:13:56 -04:00
Ben Avison
57723b83e8
ARM: SIMD assembly optimization for function BlitRGBtoRGBPixelAlpha
...
Much of the heavy lifting of this optimization is lifted from the Pixman
project, which is distributed under an MIT-style license. As far as possible,
these elements have been relicensed to the zlib license.
2019-10-24 21:13:05 -04:00
Ben Avison
6a6a05289e
ARM: Create configure option --enable-arm-simd to govern assembly optimizations
2019-10-24 21:12:08 -04:00
Alex Szpakowski
59beaccd50
macOS: Expose high dpi-capable display modes on macOS 10.13+.
...
Fixes an issue in macOS 10.15 where the displayed content would move up after entering, exiting and re-entering exclusive fullscreen when certain display modes were used (bug #4822 ).
Bug #3949 is also related to this change.
2019-10-24 20:15:54 -03:00
Sylvain Becker
8081f11773
Fixed bug 2014 - Hardcoded srcA value in SDL_Blit_auto.c functions
2019-10-24 18:07:30 +02:00
Sylvain Becker
3a8b899428
Android: remove eglGetProcAdded busted comment (bug #4040 )
2019-10-23 11:07:11 +02:00
Sylvain Becker
0f871c033c
Fixed bug 4843 - Passing NULL to memset in SDL_PrivateLoadButtonMapping
...
(Thanks!)
2019-10-23 09:53:23 +02:00
Sylvain Becker
ed469fa586
Fixed bug 4842 - Redundant condition in MS_ADPCM_Decode and IMA_ADPCM_Decode
...
(Thanks!)
2019-10-23 09:36:41 +02:00
Sylvain Becker
c9d0e2ae0a
Fixed bug 4840 - Read of uninitialized memory in DXGI_LoadDLL (Thanks!)
2019-10-23 09:26:27 +02:00
Sylvain Becker
d5d34de4db
Fixed bug 4839 - Read of uninitialized memory in Win32_ResizeWindowShape
...
(Thanks!)
2019-10-23 09:17:53 +02:00
Sylvain Becker
758badffa5
Fixed bug 4841 - Misplaced parenthesis WIN_WindowProc / WM_ACTIVATE / ClipCursor
...
(Thanks!)
2019-10-23 08:58:52 +02:00
Sylvain Becker
b7ab3b3984
Fixed bug 4838 - Use after free in SDL_JoystickUpdate (Thanks!)
2019-10-23 08:50:57 +02:00
Sylvain Becker
3ac67cf458
Fixed bug 4837 - Use after free in SDL_SensorUpdate (Thanks!)
2019-10-23 08:46:59 +02:00
Sam Lantinga
5025109f29
Fixed accidental whitespace
2019-10-22 15:43:58 -07:00
Sam Lantinga
9da4bfc141
Added support for the Power A Nintendo Switch Enhanced Wireless Controller
2019-10-22 10:57:07 -07:00
Sam Lantinga
f96da11f93
Reordered Power A Switch controllers so they're grouped together
2019-10-22 10:28:51 -07:00
Sam Lantinga
9e7894efac
Added support for the PowerA - Super Mario Controller
2019-10-22 10:27:30 -07:00
Ryan C. Gordon
9ececeeaa4
cpuinfo: Use a better default alignment value (thanks, Simon!).
...
Fixes Bugzilla #4835 .
2019-10-20 22:17:59 -04:00
Sam Lantinga
cdc7181e6d
Don't try to use the Xbox HID protocol with the NVIDIA Shield controllers
2019-10-19 01:54:02 -07:00
Sylvain Becker
336a75491e
remove warning prototype SDL_ExitProcess()
2019-10-19 09:23:40 +02:00
Ozkan Sezer
9c14c789ad
updated includes for _exit()
2019-10-18 23:10:00 +03:00
Sylvain Becker
24bee6e5e2
Add internal function SDL_EGL_GetVersion()
2019-10-18 21:47:30 +02:00
Sam Lantinga
b060b2eadd
Fixed whitespace
2019-10-18 08:56:54 -07:00
Sylvain Becker
412ab7e1aa
Fixed bug 4829 - Sensor events incorrectly disabled
2019-10-18 14:23:37 +02:00