Commit graph

11627 commits

Author SHA1 Message Date
Sam Lantinga
6cb3b5112c Fixed DragonRise Generic USB PCB showing up as a PS3 controller 2019-11-23 12:11:16 -08:00
Sam Lantinga
11431c5c53 Added the Linux hidraw sources when libusb isn't available 2019-11-23 11:35:20 -08:00
Sam Lantinga
2fba75a8fe 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
9bb60d130b SDL_gamecontroller.h: remove comma at end of enumerator list 2019-11-23 03:28:02 +03:00
Sam Lantinga
07880dca0e Use SDL_zeroa() appropriately 2019-11-22 16:23:37 -08:00
Sam Lantinga
dd2258c2c3 Fixed build 2019-11-22 14:09:24 -08:00
Sam Lantinga
c9c9eb41b6 Added support for the PDP Versus Fighting Pad 2019-11-22 13:44:40 -08:00
Sam Lantinga
e061577afb Added SDL_GameControllerTypeForIndex() and SDL_GameControllerGetType() to return the type of controller attached. 2019-11-22 13:12:12 -08:00
Sam Lantinga
6d873be06d Added support for the PDP Battlefield One controller 2019-11-21 14:04:48 -08:00
Sam Lantinga
fc6c409633 Fixed the guide button on the NVIDIA Controller v01.04 2019-11-21 13:09:00 -08:00
Sam Lantinga
24fd9254ac Added support for the NVIDIA Controller v01.04 on Linux and Mac OS X 2019-11-21 12:11:47 -08:00
Ozkan Sezer
d7ef3d9d79 fix xcode project file permissions 2019-11-21 23:04:20 +03:00
Sam Lantinga
34608829ba Added support for the NVIDIA Controller v01.04 on Android 2019-11-21 11:52:50 -08:00
Sam Lantinga
e6e255bb87 Added support for the MOGA XP5-A Plus 2019-11-21 10:14:57 -08:00
Sam Lantinga
7ee14a9bc1 Turned on controllermap debug output by default 2019-11-21 10:09:26 -08:00
Ozkan Sezer
5314c4626a ran gendynapi.pl after newly added SDL_string.c functions. 2019-11-21 11:50:50 +03:00
Ozkan Sezer
ef80e4516b updated os/2 config file 2019-11-21 11:33:50 +03:00
Ozkan Sezer
2485c440fb CMakeLists.txt: add several missing function checks for unix case. 2019-11-21 10:33:56 +03:00
Ozkan Sezer
6e3cb7cffa configure: add back mistakenly removed strtok_r check, and regenerate. 2019-11-21 10:02:02 +03:00
Sam Lantinga
7b8e308a67 Improved XInput VID/PID detection and added SDL_wcsstr() and SDL_wcsncmp() 2019-11-20 16:42:50 -08:00
Ozkan Sezer
79725cdb32 added SDL_strtokr() as a replacement for POSIX strtok_r (bug #4046.) 2019-11-20 20:40:50 +03:00
Sam Lantinga
cc27616f85 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
016dd1f1d1 SDL.c (SDL_ExitProcess): unconstify its param to match its declaration. 2019-11-20 02:47:40 +03:00
Sam Lantinga
5a9fd48247 Added support for the Xbox One Elite Series 2 controller on Mac OSX 2019-11-19 15:15:00 -08:00
Sam Lantinga
66cb584318 Added support for the Xbox One Elite Series 2 controller in wired mode 2019-11-18 15:46:13 -08:00
Sam Lantinga
42c37b06bc 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
cda9fd15e6 Added names for some missing Xbox controllers 2019-11-18 11:51:39 -08:00
Sam Lantinga
43768687d0 Added identifiers for the Xbox One Elite Series 2 controller 2019-11-18 11:44:51 -08:00
Sam Lantinga
4dd086735a Fixed unused function warning on Android 2019-11-18 10:48:14 -08:00
Sam Lantinga
3a7e57f1da 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
0b0de4f563 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
b7e16c20c8 atomic: Support compiling on ARMv3 2019-10-11 22:08:53 +01:00
Cameron Cawley
935a136364 Added SDL_PIXELFORMAT_BGR444 2019-11-02 22:58:52 +00:00
Sam Lantinga
d2805d6e55 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
a8a6d3497b Added support for the Xbox One S controller in Bluetooth mode on Linux 2019-11-16 19:55:53 -08:00
Sylvain Becker
03ad3136c8 Fix missing prototype warning 2019-11-16 22:59:56 +01:00
Sylvain Becker
02c7e4fd6f Fix crash when detecting SIMD 2019-11-16 22:55:36 +01:00
Sam Lantinga
53768d7d97 Added a utility function to simplify the hint handling logic 2019-11-13 21:53:01 -08:00
Sam Lantinga
c3ed380542 Supported Android and Apple hardware has ARM SIMD capability 2019-11-13 15:46:58 -08:00
Sam Lantinga
3ea1eb5600 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
61f5cf85e1 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
8567ce86de 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
3af07e9794 haiku: mouse_relative fix
Partially fixes Bugzilla #4442.
2019-11-11 22:23:33 -05:00
Peter Kosyh
6bbeb84a69 haiku: mouse->ShowMouse method added
Partially fixes Bugzilla #4442.
2019-11-11 22:22:40 -05:00
Gerasim Troeglazov
14fb2a9093 haiku: Add support for relative mouse mode.
Partially fixes Bugzilla #4442.
2019-11-11 22:21:17 -05:00
Gerasim Troeglazov
48bde81cb6 haiku: Add simple relative mode for mouse.
Partially fixes Bugzilla #4442.
2019-11-11 22:18:21 -05:00
Adrien Destugues
c2364e8d6a 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
8380785be9 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
a48e635af9 haiku: Invert mouse wheel values to match what SDL expects.
Partially fixes Bugzilla #4442.
2019-11-11 21:59:39 -05:00
EXL
78010bafad 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.

--HG--
extra : amend_source : 1bada5c1e8f4b81a40bca7158c404b88a97d3dbc
2019-11-11 16:44:40 -05:00