Commit Graph

11628 Commits

Author SHA1 Message Date
Sam Lantinga
d287743396 Linux hidapi code dynamically loads udev 2019-11-23 12:11:20 -08:00
Sam Lantinga
9d9021bbc1 Fixed DragonRise Generic USB PCB showing up as a PS3 controller 2019-11-23 12:11:16 -08:00
Sam Lantinga
fdc498c251 Added the Linux hidraw sources when libusb isn't available 2019-11-23 11:35:20 -08:00
Sam Lantinga
5b2b08c6d1 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
Ozkan Sezer
31eea5c6f0 SDL_gamecontroller.h: remove comma at end of enumerator list 2019-11-23 03:28:02 +03:00
Sam Lantinga
1429c9636b Use SDL_zeroa() appropriately 2019-11-22 16:23:37 -08:00
Sam Lantinga
348443073d Fixed build 2019-11-22 14:09:24 -08:00
Sam Lantinga
fcda72600b Added support for the PDP Versus Fighting Pad 2019-11-22 13:44:40 -08:00
Sam Lantinga
834512e872 Added SDL_GameControllerTypeForIndex() and SDL_GameControllerGetType() to return the type of controller attached. 2019-11-22 13:12:12 -08:00
Sam Lantinga
c10b5a8f07 Added support for the PDP Battlefield One controller 2019-11-21 14:04:48 -08:00
Sam Lantinga
d64a7eb388 Fixed the guide button on the NVIDIA Controller v01.04 2019-11-21 13:09:00 -08:00
Sam Lantinga
68a7d2c154 Added support for the NVIDIA Controller v01.04 on Linux and Mac OS X 2019-11-21 12:11:47 -08:00
Ozkan Sezer
bb0be38b4f fix xcode project file permissions 2019-11-21 23:04:20 +03:00
Sam Lantinga
562a1848b6 Added support for the NVIDIA Controller v01.04 on Android 2019-11-21 11:52:50 -08:00
Sam Lantinga
77357ac9a0 Added support for the MOGA XP5-A Plus 2019-11-21 10:14:57 -08:00
Sam Lantinga
a10feb5814 Turned on controllermap debug output by default 2019-11-21 10:09:26 -08:00
Ozkan Sezer
6b348cb405 ran gendynapi.pl after newly added SDL_string.c functions. 2019-11-21 11:50:50 +03:00
Ozkan Sezer
6702986664 updated os/2 config file 2019-11-21 11:33:50 +03:00
Ozkan Sezer
353d490a50 CMakeLists.txt: add several missing function checks for unix case. 2019-11-21 10:33:56 +03:00
Ozkan Sezer
fe2bae46fb configure: add back mistakenly removed strtok_r check, and regenerate. 2019-11-21 10:02:02 +03:00
Sam Lantinga
5a936d3e3f Improved XInput VID/PID detection and added SDL_wcsstr() and SDL_wcsncmp() 2019-11-20 16:42:50 -08:00
Ozkan Sezer
5993c768c0 added SDL_strtokr() as a replacement for POSIX strtok_r (bug #4046.) 2019-11-20 20:40:50 +03:00
Sam Lantinga
45dbd7ad7a 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
83017eaa0a SDL.c (SDL_ExitProcess): unconstify its param to match its declaration. 2019-11-20 02:47:40 +03:00
Sam Lantinga
4707083dc2 Added support for the Xbox One Elite Series 2 controller on Mac OSX 2019-11-19 15:15:00 -08:00
Sam Lantinga
1a724af313 Added support for the Xbox One Elite Series 2 controller in wired mode 2019-11-18 15:46:13 -08:00
Sam Lantinga
6d3ce23877 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
07ae66d77f Added names for some missing Xbox controllers 2019-11-18 11:51:39 -08:00
Sam Lantinga
6ab00e91cb Added identifiers for the Xbox One Elite Series 2 controller 2019-11-18 11:44:51 -08:00
Sam Lantinga
73f5e4eefe Fixed unused function warning on Android 2019-11-18 10:48:14 -08:00
Sam Lantinga
e6c52b1be5 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
96686ae410 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
5ca491b2a2 atomic: Support compiling on ARMv3 2019-10-11 22:08:53 +01:00
Cameron Cawley
a1c11854f2 Added SDL_PIXELFORMAT_BGR444 2019-11-02 22:58:52 +00:00
Sam Lantinga
3f6927c919 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
54e30631f0 Added support for the Xbox One S controller in Bluetooth mode on Linux 2019-11-16 19:55:53 -08:00
Sylvain Becker
426695fe8d Fix missing prototype warning 2019-11-16 22:59:56 +01:00
Sylvain Becker
96df5eaa25 Fix crash when detecting SIMD 2019-11-16 22:55:36 +01:00
Sam Lantinga
a110eacfdd Added a utility function to simplify the hint handling logic 2019-11-13 21:53:01 -08:00
Sam Lantinga
3c1d4a14e2 Supported Android and Apple hardware has ARM SIMD capability 2019-11-13 15:46:58 -08:00
Sam Lantinga
ec197b00c7 SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS defaults to true, to match Steam's default behavior 2019-11-13 14:24:48 -08:00
Anuj Mittal
65bf5eeccb configure: check for build dir when building version res (fix bug #4858)
Fixes a race where we try to build version res file in build directory
before it has even been created. Prevents errors like:

/bin/bash ../SDL2-2.0.10/build-scripts/updaterev.sh
/bin/bash ../SDL2-2.0.10/build-scripts/mkinstalldirs build
mkdir -p -- build
x86_64-pokysdk-mingw32-windres --include-dir=/home/pokybuild/yocto-worker/meta-mingw/build/build/tmp/work/x86_64-nativesdk-mingw32-pokysdk-mingw32/nativesdk-libsdl2/2.0.10-r0/recipe-sysroot/opt/poky/3.0/sysroots/x86_64-pokysdk-mingw32/usr/include ../SDL2-2.0.10/src/main/windows/version.rc build/version.o
x86_64-pokysdk-mingw32-windres: build/version.o: No such file or directory
Makefile:692: recipe for target 'build/version.o' failed
make: *** [build/version.o] Error 1
make: *** Waiting for unfinished jobs....
touch build/.created
WARNING: exit code 1 from a shell command.

Extension of fix:
https://hg.libsdl.org/SDL/rev/99d8b18acf8a

Signed-off-by: Anuj Mittal <am.devel@gmail.com>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2019-11-13 10:51:02 +03:00
EXL
0291734479 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
141deeaeb9 haiku: mouse_relative fix
Partially fixes Bugzilla #4442.
2019-11-11 22:23:33 -05:00
Peter Kosyh
6368d67967 haiku: mouse->ShowMouse method added
Partially fixes Bugzilla #4442.
2019-11-11 22:22:40 -05:00
Gerasim Troeglazov
af8741e7fb haiku: Add support for relative mouse mode.
Partially fixes Bugzilla #4442.
2019-11-11 22:21:17 -05:00
Gerasim Troeglazov
d103e13ad5 haiku: Add simple relative mode for mouse.
Partially fixes Bugzilla #4442.
2019-11-11 22:18:21 -05:00
Adrien Destugues
df7259cda8 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
19a29074f5 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
42a3b9b9f6 haiku: Invert mouse wheel values to match what SDL expects.
Partially fixes Bugzilla #4442.
2019-11-11 21:59:39 -05:00